Key IDS

David Shaw dshaw@jabberwocky.com
Mon Mar 25 20:16:02 2002


On Mon, Mar 25, 2002 at 10:46:08AM -0800, Rasoul Hajikhani wrote:
> Hello folks,
> In the FAQs there is section for getting the key ids used to encrypt a
> message. However, I get an error when I run this code:
> 
> gpg --batch --decrypt --list-only --status-fd 1 2>/dev/null | awk
> '/^\[GNUPG:\] ENC_TO / { print $3 }'
> 
> And here is the error:
> Ambiguous output redirect.

What shell are you using?  That's a SH-ish shell line, but the error
message is from csh or a near relative.

Try the command using sh or bash.  If you must do it with csh, try
this:

gpg --batch --decrypt --list-only --status-fd 1 | awk '/^\[GNUPG:\] ENC_TO / { print $3 }'

David

-- 
   David Shaw  |  dshaw@jabberwocky.com  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson