![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to encrypt and decrypt a file | laknar | Shell Programming and Scripting | 2 | 12-11-2007 08:18 AM |
| Encrypt and Decrypt script | shary | Shell Programming and Scripting | 9 | 12-11-2007 08:11 AM |
| AWK script: decrypt text uses frequency analysis | SerJel | Shell Programming and Scripting | 4 | 11-27-2007 03:16 AM |
| Decrypt Des file - then encrypt | frustrated1 | SUN Solaris | 0 | 09-07-2006 05:38 PM |
| How to decrypt a file encrypted with vi? | Gerry | UNIX for Dummies Questions & Answers | 1 | 04-22-2001 02:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Decrypt a GPG file through shell script
Hi,
I'm trying to decrypt a gpg file thorugh a shell script. But i' could'nt. My script is , -sh-3.1$ cat test_gpg.sh #!/bin/ksh echo " Hello, iam testing GPG" gpg prabhu.txt.gpg <<EOF prompt prabhu EOF exit 0 The file i'm trying to decrypt is prabhu.txt.gpg and my passphrase is "prabhu". Can someone please help me on this ASAP. ---------- Post updated 07-03-09 at 06:37 PM ---------- Previous update was 07-02-09 at 08:51 PM ---------- Hi all, Just sharing this for informative purpose. My below script works succesfully. #!/bin/ksh ### Fetching the password from file or database pass_phrase=`cat radhas_pwd|awk '{print $1}'` ### Decrypting the encrypted file by passing the passphrase and the output file gpg --passphrase $pass_phrase --output prabhu.txt --decrypt prabhu.txt.gpg exit |
|
||||
|
Quote:
just this would do Code:
pass_phrase=`awk '{print $1}' radhas_pwd`
|
| Sponsored Links | ||
|
|