10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I have a script which assign awk output to shell variable. current it uses two awk command to assign value to two variables. I want to use one command to assign two values to two variables. I tried the code, but it does't work. kindly provide your suggestion.
current code... (2 Replies)
Discussion started by: green_k
2 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
May i please why my shell variable is not getting passed into awk script.
#!/bin/bash -vx
i="1EB07C50"
/bin/awk -v ID="$i" '/ID/ {match($0,/ID/);print substr($0,RSTART,RLENGTH)}' /var/log/ScriptLogs/keys.13556.txt
Thank you. (1 Reply)
Discussion started by: Ariean
1 Replies
3. Shell Programming and Scripting
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt
set feedback off
set heading off
select 114032 as c_1 from dual ;
EOF
for i in `cat sql_1.txt`
do
sh script_1.sh $i
Currently i am passing one column value to the single unix variable.
How can i pass the values from 2... (2 Replies)
Discussion started by: rafa_fed2
2 Replies
4. Shell Programming and Scripting
I want to pass a shell variable to awk script :
# cat file
PSAPSR3 3722000 91989.25 2 98
PSAPSR7 1562000 77000.1875 5 95
PSAPUNDO 92000 4087.5625 4 96
#... (8 Replies)
Discussion started by: Reboot
8 Replies
5. UNIX for Dummies Questions & Answers
Hi,
My script will take 3 i/p's from user. Now i need to pass these 3 values to remote server. Please find my code.
while
do
echo " To which server you want to connect ? "
echo " 1. server1 \n"
echo " 2. server2 \n"
read opt_server
if
then
echo "enter the... (2 Replies)
Discussion started by: sree143reddy
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a file with 4 columns.
An arbitrary example is shown below:
a Tp 10 xyz
b Tq 8 abc
c Tp 99 pqr
d Tp 44 rst
e Tr 98 efg
Based on the values in col 2 and col 3, I will execute another program.
I have been running this:... (5 Replies)
Discussion started by: Gussifinknottle
5 Replies
7. Shell Programming and Scripting
I am a newbie to awk and c programming, however am not a unix newbie. However, I do need help with a kshell script I am writing. It is almost complete, the last step is killing me. Any help would be greatly appreciated. What I am trying to do is cat a text file that has usernames. Then, using... (2 Replies)
Discussion started by: synergy_texas
2 Replies
8. Shell Programming and Scripting
Hi,
I have a situation where I have to specify a different value to an awk command, I beleive i have the gist of this done, however I am not able to get this correct. Here is what I have so far
echo $id
065859555
This value occurs in a "pipe" delimited file in postition 8. Hence I would... (1 Reply)
Discussion started by: jerardfjay
1 Replies
9. Shell Programming and Scripting
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)
Discussion started by: bcheaib
3 Replies
10. Shell Programming and Scripting
found that passing (input) values to awk, all work well. For example:
errpt | awk 'BEGIN { errore=0 }
substr($2,1,4) /'ParamData'/ {
....
} ' ParamData=`date +"%m%d"`
Now I wish to obtain (output) a value. Using this method is it possible to re-write ParamData, for example?
Thanks in... (3 Replies)
Discussion started by: gio123bg
3 Replies