10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Please need to print the Rej variable outsite the awk script which is given below...please advised how to achieve it.
#!/bin/bash
echo "Enter DMU Pipe delimited File name for the Feed to be validated"
read DMU_File
echo "Enter Pre-DMU File name for the Feed"
read Predum_file
... (3 Replies)
Discussion started by: pelethangjam
3 Replies
2. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
3. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies
4. Shell Programming and Scripting
Why does this work
for myfile in `find . -name "R*VER" -mtime +1`
do
SHELLVAR=`grep ^err $myfile || echo "No error"`
ECHO $SHELLVAR
done
and outputs
No error
err ->BIST Login Fail 3922 err
No error
err ->IR Remote Key 1 3310 err
But... (2 Replies)
Discussion started by: alan
2 Replies
5. Shell Programming and Scripting
Hi,
I basically have 2 shell scripts.
One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system.
Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn.
... (2 Replies)
Discussion started by: sunrexstar
2 Replies
6. Shell Programming and Scripting
I have a working and tested AWK script that removes duplicates from an input file and generates an output file without the duplicates.
I had help from my other post to develop it:
... (3 Replies)
Discussion started by: script_op2a
3 Replies
7. Shell Programming and Scripting
Hello Experts,
Actually I was searching for a solution here in this forum , but didn't get what exactly I want . Is this possible to do in awk ?
I am trying to do some thing like below in ksh script . Upto my knowledge I can pass shell script to awk with "-v " option.
But I... (3 Replies)
Discussion started by: user_prady
3 Replies
8. Shell Programming and Scripting
Hello experts,
can I return a value from gawk to a shell script ?
My script as follows,
#Here I want the num value to shell script so that I can use later
gawk '
{
split($0,num,",");
print num
}'
gawk -v no=$number '{print no}'
file1
... (3 Replies)
Discussion started by: user_prady
3 Replies
9. UNIX for Dummies Questions & Answers
Hey Guys
from the below script what I understood is we are sending the the first parameter as input to the main (){} file
main > $LOGFILE 2>&1
but can we send two or three parameter as input to this main file as
main > $LOGFILE 2>&1 2>&2 like this
Can any one plz help I need to writ a... (0 Replies)
Discussion started by: pinky
0 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a shell script with an ambedded awk script.
i need to pass a script variable to the awk script.
Please help.
Thanks in advance
Himani (3 Replies)
Discussion started by: HIMANI
3 Replies