trying to execute gpg in a csh script

Posted on 2006-05-04
Last Modified: 2013-12-26
when I run this command on the command line
/usr/local/bin/gpg --always-trust -o /pw/data/EC_qual/gentran/vanout/backup/IBMC.0504135259.enc -se -r ecgpdd -u PaulFGreene --passphrase XXXXXXX  --armor /pw/data/EC_qual/gentran/vanout/backup/IBMC.0504135259

the file's encrypted and I get warning message but no prompts which is what I need BUT

when I run this script on the command line

call_gpgencrypt.csh /pw/data/EC_qual/gentran/vanout/backup/IBMC.0504135259 /pw/data/EC_qual/gentran/vanout/backup/IBMC.0504135259.enc

if ($#argv != 2) then
 echo 'two arguments not passed <tempfile> <logfile>'
 exit 1
set ftpdate = `date +%m%d%H%M%S`
set tempfile = $argv[1]
set logfile = $argv[2]
/usr/local/bin/gpg --always-trust -o $logfile -se -r ecgpdd -u PaulFGreene --passphrase xxxxxx  --armor $tempfile

 I get
gpg: skipped "PaulFGreene": bad passphrase
gpg: [stdin]: sign+encrypt failed: bad passphrase
what's wrong
Question by:pf_greene724
    LVL 51

    Accepted Solution

    does your passphrase contain  something else than [a-zA-Z0-9.,] then you need to escape the characters or quote the string
    you also may try using   --passphrase-fd 0

    Author Comment

    yws I have a # I'll try quotes

    Author Comment

    that worked

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Adapt this command to show who installed 29 99
    Replacement selected text 2 45
    java ^ examples 8 51
    wordappend challenge 8 51
    Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
    Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now