[wellylug] encryption question
Mark Signal
mark at databackup.co.nz
Sat Aug 28 22:04:57 NZST 2004
thanks
this worked
IFS=$'\n'
# if the encryption key is there use it to encrypt all files
if [ -f $KEY ]; then
for FILE in `find $DATADIR -type 'f' | grep -i -E
"\.[dx][ol][cs]$"`;
do
ccrypt -eqfS .encrypted -k $KEY $FILE
done
fi
this just encrypts .doc and .xls file at the moment
What does IFS refer to?
and is it IFS=$' \t\n' by default?
thanks again
Mark
-----Original Message-----
From: wellylug-admin at lists.wellylug.org.nz
[mailto:wellylug-admin at lists.wellylug.org.nz]On Behalf Of Andrej
Sent: Saturday, 28 August 2004 7:20 p.m.
To: wellylug at lists.wellylug.org.nz
Subject: Re: [wellylug] encryption question
On Sat, 28 Aug 2004 18:37, Mark Signal wrote:
> Progress... sort of
>
> I can get mcrypt working with ...
>
> for file in `find $1 -type 'f' | grep -v *.cpt`;
> do
> cat $file | mcrypt -a blowfish -b -k $passwd > "$file.cpt"
> rm -f $file
> done
> but it vomits on file and directory names with spaces in them
> it seems to treat each space in a line as a new instance of
> $file whereas I want the new instance to begin on each new
> line.
>
>
> any thoughts?
You could try setting the IFS=$'\n'
That aside, file-names with spaces are atrocious ;}
> cheers
> Mark
Cheers,
Andrej
--
Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
To Leave: http://lists.wellylug.org.nz/mailman/listinfo/wellylug
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
More information about the wellylug
mailing list