10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
I have a shell program that calls another shell program
the following code works
. chkTimeFormat.sh "10/9/12 17:51:19:783."|read c
but when I am passing the the time in a variable like in the code below, the shell chkTimeFormat.sh is not returning proper value
time="10/9/12... (9 Replies)
Discussion started by: swayam123
9 Replies
3. Shell Programming and Scripting
I have a script that kicks off several processes in the background and stored their pids in a variable as follows:
PID_DUMP_TRAN=$PID_DUMP_TRAN" "$!
so I then have a list of pids
If I echo $PID_DUMP_TRAN I get back a list of pids e.g. 8210 8211 8212
However I then want to kill all these... (5 Replies)
Discussion started by: sjmolloy
5 Replies
4. Shell Programming and Scripting
Can we pass perl variable to shell commands. If yes, please give some example. (2 Replies)
Discussion started by: Anjan1
2 Replies
5. Shell Programming and Scripting
I am trying to execute a copy command via shell script. However, on occassion, 2 or more files need to copied. How do I code for the multiple arguments? Does it matter how the files are delimited?
Example: I have a script to copy files from 1 dir to another called duplicate.csh
In most... (1 Reply)
Discussion started by: CKT_newbie88
1 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
Hi, I had to create a new thread as the old thread had to much of confusion
I have two files shashi.sh and py.py
I want to pass a variable from shashi.sh to py.py. How do i achieve that ?.
shashi.sh
export X=12
echo "$("pwd")"
echo "$X"
exec python py.py "$(X)"
py.py... (0 Replies)
Discussion started by: shashi792
0 Replies
8. UNIX for Dummies Questions & Answers
I need to set up a strange system through which an arbitrary command is sent to a number of different servers (well, actually, VPS accounts). We have a command "vpass" that "passes" a command from the root level to resident VPS accounts. Suppose I wanted each VPS to do some trivial thing, like... (3 Replies)
Discussion started by: treesloth
3 Replies
9. Shell Programming and Scripting
I am trying to make a simple script in which i take input from shell and then forward the value to
nawk (BEGIN).
but when i run below mention script so it give no output.
echo "Enter TRUNK GROUP:"
read TGR
cat /omp-data/logs/5etr/080422.APX | nawk -F"|" -v P=$TGR '
BEGIN {
TG=P;... (1 Reply)
Discussion started by: wakhan
1 Replies
10. Shell Programming and Scripting
dear all
How to passing the parameters or results to outside of the AWK program? anyone can help
awk '{print $1}' file1 > $a ? (2 Replies)
Discussion started by: trynew
2 Replies