The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 07-13-2009
pludi's Avatar
pludi pludi is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,886
That's probably because what I provided isn't a complete script, but rather an example of what it would look like when done manually. Posting again with comments to clarify:
Code:
> cat pass    # Run the 'cat' program to show the contents of file 'pass' which
              # contains the passphrase
s3cr3t        # Contents of file 'pass'
# Calling gpg in batch mode, telling it not to allocate a TTY, asking for
# ASCII-Armor output (non-binary data), providing the passphrase in file 'pass',
# symmetric enryption for file 'test.file'
> gpg --batch --no-tty --armor --passphrase-file pass --symmetric test.file
> ls test.*   # Display a listing of the original & encypted file
test.file  test.file.asc
> file test.file.asc # Run the 'file' utility to take a guess at the type of the
                     # content of file 'test.file.asc'
test.file.asc: PGP armored data message # It tells us that it's encrypted,
                                        # armored data
All you have to do is substitute the filenames I used with those you have. As soon as you've got that down, start using variables instead of filenames. And when that's done you can start with the for loop.