Slightly off topic ...
David Shaw
dshaw@jabberwocky.com
Thu Aug 30 03:09:01 2001
On Thu, Aug 30, 2001 at 02:02:52AM +0200, Johannes Graumann wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> ... but I'll try anyway: why does under bash (RH 7.1, 2.04.21(1))
> alias clearsign='mount /mnt/floppy && gpg --clearsign'
> work, but
> alias clearsign='mount /mnt/floppy && gpg --clearsign && umount /mnt/floppy'
> not?
When you make an alias like that, you are prepending a string to your
input. So, with the first alias, if you enter "clearsign foobar" you
are executing:
mount /mnt/floppy && gpg --clearsign foobar
With the second alias, you are executing:
mount /mnt/floppy && gpg --clearsign && umount /mnt/floppy foobar
The second line is clearly nonsensical. You could pretty easily make
a shell script to do this instead:
#!/bin/bash
mount /mnt/floppy
gpg --clearsign $*
umount /mnt/floppy
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