Output file to specific directory?
Josh Huber
huber at alum.wpi.edu
Wed Dec 17 11:29:22 CET 2003
"Peter Schott" <pschott at drivefinancial.com> writes:
> The main thrust of the thread was whether it was possible to output
> to a specified directory without needing to know the filename as
> well - just whatever comes out, place in directory X. Seems the
> only way to do that is by specifying the directory as part of the
> output file name. That answers my question. May not have been the
> answer I wanted, but I can make it work other ways.
It seems like it. Does the windows command shell have any features
like the following?
FULLNAME="/tmp/secret.gpg"
DIR=$(dirname $FULLNAME)
FILE=$(basename $FULLNAME)
FILE_NOEXT=${FILE%.*}
echo $FULLNAME, in dir: $DIR, file name: $FILE, no extension: $FILE_NOEXT
outputs:
/tmp/secret.gpg, in dir: /tmp, file name: secret.gpg, no extension: secret
--
Josh Huber
More information about the Gnupg-users
mailing list