Systems Automation
A Blog of Automation and Administration Activities
Tuesday, August 18, 2009
Unencrypting a directory of gpg files in perl
Here is a way to unencrypt all files in a directory which contain many gpg files
my @FList=`ls *.gpg`;
foreach $FFile (@FList)
{
open (MYFILE, "echo $secret | gpg --batch --passphrase-fd 0 --decrypt $FFile | cut -c2-5 |");
while (
){
print "Line # ".$i." ".$_;
$i++;
}
close MYFILE;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment