Sponsored Content
Full Discussion: To pass the variable in gpg
Top Forums Shell Programming and Scripting To pass the variable in gpg Post 302682905 by chakkaravarthy on Tuesday 7th of August 2012 04:01:09 AM
Old 08-07-2012
To pass the variable in gpg

Hi,
While m using gpg manually it works fine. I want to include this command [marked in Red font] in my auto script. how to pass the passphrase and Use this key anyway? (y/N) in my script. Advance thanks.

$ gpg --sign --output xx.gpg --encrypt --recipient GXS_CTE xx.ext
You need a passphrase to unlock the secret key for
user: "payrun (payment process test) <payrun@xx.com>"
1024-bit DSA key, ID 943F45B4, created 2012-08-07

+------------------------------------------------------------------------------------+
¦ Please enter the passphrase to unlock the secret key for the OpenPGP certificate: ¦
¦ "payrun (payment process test) <payrun@xx.com>" ¦
¦ 1024-bit DSA key, ID 943F45B4, ¦
¦ created 2012-08-07. ¦
¦ ¦
¦ ¦
¦ Passphrase **********_____________________________________________________________ ¦
¦ ¦
¦ <OK> <Cancel> ¦
+------------------------------------------------------------------------------------+

gpg: 89709B71: There is no assurance this key belongs to the named user
pub 2048g/89709B71 2005-10-11 GXS_CTE
Primary key fingerprint: 511F F709 ACEB 570F F96C BFAB 15C7 331B 77B7 A94D
Subkey fingerprint: 6A36 AE14 A2ED 169B 6F5F 174D 0B61 8769 8970 9B71
It is NOT certain that the key belongs to the person named
in the user ID. If you *really* know what you are doing,
you may answer the next question with yes.
Use this key anyway? (y/N) y
$

Last edited by chakkaravarthy; 08-07-2012 at 05:09 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

pass variable to awk

i would like to pass a variable to awk wherein the variable comes from external loop. i tried this... let x=0 until test $x -eq 32 do cat file | awk '{ print $1 , "Number" , $($x) }' >> output done thanks, (4 Replies)
Discussion started by: inquirer
4 Replies

2. Shell Programming and Scripting

getting the file name and pass as variable

Can any one suggest me how to check the file extension and pass the name based out of the filename within the folder. There would be always one latest file in the folder, but extension may vary... ie .csv, .CSV,.rpt,.xls etc what is best way to get the latest file name and pass as variable.... (1 Reply)
Discussion started by: u263066
1 Replies

3. Shell Programming and Scripting

how to pass variable to grep?

Hi I have a such conditional: SPAMH="it is SPAM" if grep -q $SPAMH $NMDIR/$mail; then SPAMHFLAG=1 else SPAMHFLAG=0 fi And grep doesn't catch this string, even it exists there. I think it's a problem with passing $SPAMH to grep. I tried... (2 Replies)
Discussion started by: xist
2 Replies

4. UNIX for Dummies Questions & Answers

How To Pass an Array Variable

Hi, I have a master BASH shell script where I define a bunch of variables: $var1=why $var2=is $var3=(this so hard) I would then like to call another shell script and pass these variables to it: $script2 $var1 $var2 $var3 This works fine for var1 and var2. However, var3 is an array,... (9 Replies)
Discussion started by: msb65
9 Replies

5. Shell Programming and Scripting

Pass variable to sql

Please help. I got these error. I'm try to pass variable extract from data-file.txt to sql file(select.sql). cat: cannot open select cat: cannot open * cat: cannot open from cat: cannot open user cat: cannot open where cat: cannot open name=$list; #!/bin/bash list=`sed q... (3 Replies)
Discussion started by: killboy
3 Replies

6. Shell Programming and Scripting

Problem with * when pass into variable.

Hello expert. I have a little problem here. I write a script and stuck some bug to fix. I found the problem was about * and a sample of script is below. line 1 is print * out but line 3 print all name of files in the script's path. (but I want *) I want to contain * in variable... (3 Replies)
Discussion started by: MaYuMi
3 Replies

7. Programming

How to pass table_name as variable

i need to delete the data from all the tables where a column appears Eg column_name = ABCD Now i do get all the tables where a column like ABCD appears and stores it in another table say temp There are around 800+ tables i get so my temp table has two fields table_name column_name now i... (1 Reply)
Discussion started by: mad_man12
1 Replies

8. Shell Programming and Scripting

How to pass a function with a variable parameter into another variable?

Hello again :) Am currently trying to write a function which will delete a record from a file. The code currently looks as such: function deleteRecord() { clear read -p "Please enter the ID of the record you wish to remove: " strID ... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies

9. Red Hat

How to pass value of pwd as variable in SED to replace variable in a script file

Hi all, Hereby wish to have your advise for below: Main concept is I intend to get current directory of my script file. This script file will be copied to /etc/init.d. A string in this copy will be replaced with current directory value. Below is original script file: ... (6 Replies)
Discussion started by: cielle
6 Replies

10. UNIX for Beginners Questions & Answers

Need to pass variable in a command and assign value to a variable

Hello All, Hope you're doing well ! I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted. header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy