#10 Force option depends on positon in command line

Production/Stable
open
nobody
5
2012-09-14
2003-11-11
No

I attempted to crypt [decrypt] a group of files from
the command line:

for i in *.nc
done
mcrypt [-d] --key KEY filename $i
done

This gave me a complaint about not accepting input from
stdin [stdout], even though I was giving mcrypt a file
name and it worked outside a loop.

Eventually I managed to get encryption to work if I
added "-F" to the command line.

I could not get decryption to work using -F, until I
put the -F option as the last option before the file name.

What I'm seeing are two unexpected behaviors:

(1) That using mcrypt in a loop seems to have a
different action than using mcrypt on the command line
by itself. I see this when I use the construct above,
when I use a construct such as "ls | while read; do
mcrypt -d $REPLY; done" as well. If I use -F then I can
force it to work.

(2) That the -F construct must be the final option in
the above situation in order to get mcrypt to work.

Please let me know if I can be of any further assistance.

Mcrypt v.2.6.4 (i686-pc-linux-gnu)
Linked against libmcrypt v.2.5.7

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks