Entering parameter automatically


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Entering parameter automatically
# 1  
Old 07-08-2009
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  
Old 07-08-2009
if your gpg allow this try using the following
Code:
echo mypasshrase|gpg --encrypt --passphrase-fd 0.....

# 3  
Old 07-08-2009
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  
Old 07-08-2009
How is this question different from your thread here?
# 5  
Old 07-08-2009
Hi Pludi,
In a way its same question. But here I wanna use for loop.
Please guide, i need it very badly.
# 6  
Old 07-08-2009
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  
Old 07-10-2009
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

2. Shell Programming and Scripting

Command that takes one parameter and then searches for the passed in parameter

Hi I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/ Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies

3. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

4. Shell Programming and Scripting

Entering into C shell remotely

Hi All, I want to enter into C shell from Ksh remotely. I have written code like, remsh $rHost -l $rUser -n "source $RM_HOME/run_time/.set_env.csh; jar -xvf $package.$extension" But it says; ksh: source : not found ksh: jar : not found Can anyone help me? Thanks. (1 Reply)
Discussion started by: AB10
1 Replies

5. UNIX Desktop Questions & Answers

Why can't I save a VI file after entering data?

Hi I am new to linux, when I typed "vi FILE1" I was able to open VI editor. I added some data and I want to save the file and I tried :w but it threw me an error. "file1" E212: Can't open file for writing Press ENTER or type command to continue why I am not able to save it? I read it... (16 Replies)
Discussion started by: chinnanji
16 Replies

6. Shell Programming and Scripting

how to avoid entering wildcards in a word

Hi everybody, im writing a bash script, and receiving entry from a user, and i need to check if the word has any wildcards in. do u have any ideas please . thanks . (2 Replies)
Discussion started by: new2Linux
2 Replies

7. Shell Programming and Scripting

Entering secret password

Hello All, I am trying to write a script when executed, asks you for the password, and confirm password; it should save to a file and also entered password should not be in clear text on the console - should be as **** Can somebody give me direction in writing this in shell? Thanks Chiru (4 Replies)
Discussion started by: chiru_h
4 Replies

8. Shell Programming and Scripting

how do I make dynamic parameter names? Or get the value of a parameter evaluated twi

Say I write something like the following: var1=1 var2=2 for int in 1 2 do echo "\$var$int" done I want the output to be: 1 2 Instead I get something like: $var1 $var2 (2 Replies)
Discussion started by: Awanka
2 Replies

9. UNIX for Dummies Questions & Answers

Entering directories structured above user.

I wish to enter directories which are on the HD but not part of the user hierarchy and have access to the contents of an external HD. To an advanced user this is probably a stupid question but I experimented with ~, cd, . and.. to no avail. I did check for a suitable command but couldn't find one.... (9 Replies)
Discussion started by: Frank Hunter
9 Replies

10. UNIX for Dummies Questions & Answers

entering a long command

hello everyone! Very basic question for the guru's in here but anyways, I am trying to type a command that is longer than the line. What character do I use to continue my command on the next line? Thanks in advance.... Todd (1 Reply)
Discussion started by: hedrict
1 Replies
Login or Register to Ask a Question