The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find entering ENTER key?. tsaravanan Shell Programming and Scripting 0 08-28-2008 03:49 AM
Entering secret password chiru_h Shell Programming and Scripting 4 08-20-2007 05:31 PM
how do I make dynamic parameter names? Or get the value of a parameter evaluated twi Awanka Shell Programming and Scripting 2 04-19-2007 09:37 PM
Entering Japanese text on Solaris 8 champion UNIX for Advanced & Expert Users 3 12-31-2002 02:53 PM
entering a long command hedrict UNIX for Dummies Questions & Answers 1 06-29-2001 09:31 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-08-2009
anushree.a anushree.a is offline
Registered User
  
 

Join Date: May 2008
Posts: 87
Entering parameter automatically

First of all thank you for your replies to my earlier difficulties.
Now I am facing another difficulty.
I have written following “for” loop.

For var in `find . –name “2008_reports*”`
Do
Gpg –symmetric ${var}
Done


When I use this loop it asks to enter pass phrase every time.
Is there any way out by which I can incorporate pass phrase in script itself?

Please guide me to do the same
Thank you
Anushree
  #2 (permalink)  
Old 07-08-2009
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,390
if your gpg allow this try using the following
Code:
echo mypasshrase|gpg --encrypt --passphrase-fd 0.....
  #3 (permalink)  
Old 07-08-2009
anushree.a anushree.a is offline
Registered User
  
 

Join Date: May 2008
Posts: 87
Hi Vidyadhar,
Thank you for the solution.
When i tried it i got following in return.

$ echo RIL2009-10 | gpg --encrypt --passphrase-fd 0.....
Reading passphrase from file descriptor 0
You did not specify a user ID. (you may use "-r")

Enter the user ID. End with an empty line:


where will I specify the file name to be encrypted?
  #4 (permalink)  
Old 07-08-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,839
How is this question different from your thread here?
  #5 (permalink)  
Old 07-08-2009
anushree.a anushree.a is offline
Registered User
  
 

Join Date: May 2008
Posts: 87
Hi Pludi,
In a way its same question. But here I wanna use for loop.
Please guide, i need it very badly.
  #6 (permalink)  
Old 07-08-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,839
IMO, it's the same question. Solve how to encrypt without user interaction. (and there are a lot of pointers in your other thread already) With that done the loop is only the icing on the cake.
  #7 (permalink)  
Old 07-10-2009
anushree.a anushree.a is offline
Registered User
  
 

Join Date: May 2008
Posts: 87
Dear Pludi,
I am really unable to understand what u are saying.
Plese tell me the answer straight away.
I am really in bad situation.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0