Passing a variable from shell script to mysql query?
I heard this was possible but from my research I haven't been able to figure it out yet. Seems it should be simple enough. Basically from a high level view I'm trying to accomplish...
Code:
. $X='grep foo blah.log'
then 'mysql command SELECT foo FROM bar WHERE ' . $X
hi;
i have a file containing lines like:
1|1069108123|96393669788|00963215755711|2|0|941||;serv:Pps6aSyria;first:0;bear
i want to extract the second, third and fourth record of each line and store it in a file ";" seperated
this is what i wrote
while read line
do
... (3 Replies)
hi,
I am using a shell script from where i will be conecting to sqlplus..
i am having a problem in passing a variable to sqlplus query..
i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am... (3 Replies)
Hi Everyone,
Can anyone help me how do i call hash variable in to sql query in perl. Please see the script below
i have defined two Hash %lc and %tab as below
$lc{'REFF'}='V_RES_CLASS';
$lc{'CALE'}='V_CAP_CLASS';
$lc{'XRPD'}='V_XFMR_CLASS';
$tab{'V_RES_CLASS'}='V_MFR_SERS';... (6 Replies)
I have a shell script main.sh which inturn call the python script ofdm.py, I want to pass two variables from shell script to python script for its execution. How do i achieve this ?????
Eg:
main.sh
a=3 b=3;
c= a+b
exec python ofdm.py
ofdm.py
d=c+a
Thanks in Anticipation (4 Replies)
Hello. I am writing a simple script that reads a text file and removes records from a mysql database. The items in the text file are of the format:
firstname.middle.lastXXX, where XXX is a 3 digit number. The table has an email field that will match the firstname.middle.last. So, I thought I... (1 Reply)
Hi,
I'm trying to check if methods specified in a class have been added to the corrosponding interface.
My code below is giving me the following errors:
grep: function: No such file or directory
grep: import($zipfile): No such file or directory
grep: function: No such file or... (1 Reply)
I have a script in which i connect to database to run a query and get the result of the query to a temp file. This works fine , now what i want is there is flat file which contains the value to be used in the query. I want to read this file line by line and then run the query for each value in that... (7 Replies)
What I have:
I have a input.sh (script which basically connect to mysql-db and query's multiple tables to write back the output to output1.out file in a directory)
note: I need to pass an integer (unique_id = anything b/w 1- 1000) next to the script everytime I run the script which generates... (3 Replies)
Hello,
I am running ubuntu16.04.
By means of @Rudic's help, I have below command.
What I need to do is to replace video_id by value of video_id in which WHERE clause is matched:
{print "INSERT INTO video_series_files (id, video_id, file_type, protocol, \
url, languages, quality, accessed... (12 Replies)
Discussion started by: baris35
12 Replies
LEARN ABOUT SUNOS
wanboot_keygen
wanboot_keygen(1M) System Administration Commands wanboot_keygen(1M)NAME
wanboot_keygen - create and display client and server keys for WAN booting
SYNOPSIS
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=3des
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=aes
/usr/lib/inet/wanboot/keygen -m
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=sha1
/usr/lib/inet/wanboot/keygen -d -m
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=keytype
DESCRIPTION
The keygen utility has three purposes:
o Using the -c flag, to generate and store per-client 3DES/AES encryption keys, avoiding any DES weak keys.
o Using the -m flag, to generate and store a "master" HMAC SHA-1 key for WAN install, and to derive from the master key per-client HMAC
SHA-1 hashing keys, in a manner described in RFC 3118, Appendix A.
o Using the -d flag along with either the -c or -m flag to indicate the key repository, to display a key of type specified by keytype,
which must be one of 3des, aes, or sha1.
The net and cid arguments are used to identify a specific client. Both arguments are optional. If the cid option is not provided, the key
being created or displayed will have a per-network scope. If the net option is not provided, then the key will have a global scope. Default
net and code values are used to derive an HMAC SHA-1 key if the values are not provided by the user.
OPTIONS
The following options are supported:
-c
Generate and store per-client 3DES/AES encryption keys, avoiding any DES weak keys. Also generates and stores per-client HMAC SHA-1
keys. Used in conjunction with -o.
-d
Display a key of type specified by keytype, which must be one of 3des, aes, or sha1. Use -d with -m or with -c and -o.
-m
Generate and store a "master" HMAC SHA-1 key for WAN install.
-o
Specifies the WANboot client and/or keytype.
EXAMPLES
Example 1: Generate a Master HMAC SHA-1 Key
# keygen -m
Example 2: Generate and Then Display a Client-Specific Master HMAC SHA-1 Key
# keygen -c -o net=172.16.174.0,cid=010003BA0E6A36,type=sha1
# keygen -d -c -o net=172.16.174.0,cid=010003BA0E6A36,type=sha1
Example 3: Generate and Display a 3DES Key with a Per-Network Scope
# keygen -c -o net=172.16.174.0,type=3des
# keygen -d -o net=172.16.174.0,type=3des
EXIT STATUS
0
Successful operation.
>0
An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWwbsup |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5)SunOS 5.10 18 Apr 2003 wanboot_keygen(1M)