01-19-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I do a lot of command line scripting to capture data from files or other command output. I've checked in a number of Unix and scripting books but for the life of me I can't find out how to asign field data from nawk output into variables that I can manipulate later. For example, reading a two... (6 Replies)
Discussion started by: steveje0711
6 Replies
2. Shell Programming and Scripting
Hello friends,
I doing the follwing script , but found problem to store it to a shell variable.
#! /bin/sh
for temp in `find ./dat/vector/ -name '*.file'`
do
echo $temp
nawk -v temp=$temp 'BEGIN{ split(temp, a,"\/"); print a}'
done
output:
./dat/vector/drf_all_002.file... (6 Replies)
Discussion started by: user_prady
6 Replies
3. Shell Programming and Scripting
Hi
I have the following output
Message man amm (9196) is calling
Hello & Alert man amtrr (9197) is stopped
Find amfi (19198) is cancelled
Engine Item aea (19203) is notified
Engine Item2 aea2 ... (8 Replies)
Discussion started by: PrasannaKS
8 Replies
4. Shell Programming and Scripting
Hi,
I have a string in log file from that i need to pick the username.
the string is like this--
pid 2172 tid 3124: 160: 10110847: userName :
pid 2172 tid 3124: 160: 10110847: userName :
pid 2172 tid 3124: 160: 10110847: userName :
pid 2172 tid 3124: 160: 10110847: userName :
pid... (5 Replies)
Discussion started by: namishtiwari
5 Replies
5. Shell Programming and Scripting
I have searched and the answers I have found thus far have led me to this point, so I feel I am just about there.
I am trying to convert a column of hexadecimal to decimal values so that I can filter out via grep just the data I want. I was able to pull my original 3 character hex value and... (10 Replies)
Discussion started by: PCGameGuy
10 Replies
6. Shell Programming and Scripting
Legends,
I have 2 files f1 and f2. when i use nawk to compare the difference(subtraction) from 4th column of the file, it truncates the output.
can you please help to resolve this.
subtraction is (4th col of f1 - 4th col of f2). but it gives only below lines out of 116. I want to print all... (7 Replies)
Discussion started by: sdosanjh
7 Replies
7. Shell Programming and Scripting
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Discussion started by: aix_admin_007
4 Replies
8. Shell Programming and Scripting
I need a Korn shell script which does the folllowing:-
If there is one "|" (pipe) delimited file so, the script should check the 5th field to be blank or not. if it is a blank tht entire line of the file should be redirected to another file. if the 5th field is not blank it should pass that.
... (4 Replies)
Discussion started by: Juhi Kashyap
4 Replies
9. Shell Programming and Scripting
Hi All,
I am working on nawk script, has the small function which prints the output on the screen.Am trying to print/append the same output in a file.
Basically nawk script should print the output on the console/screen and as well it should write/append the same result to a file.
script :... (3 Replies)
Discussion started by: Optimus81
3 Replies
10. Shell Programming and Scripting
Hi
I have this command, which counts number of lines in a specific file and then prints it on screen.nawk 'NF{c++}END{print "Number of GPS coordinates in file: "c}' $filename
I would like to have the output put into a variable, but can't seem to find the correct argument for it.
How do I... (3 Replies)
Discussion started by: bulleteyedk
3 Replies