10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Here is my command
print $2 was meant to select the second column however, it is getting substituted with the second argument that was passed to the script.
Can you please tell me how can I resolve this ? (6 Replies)
Discussion started by: mohtashims
6 Replies
2. Shell Programming and Scripting
Hi,
I need to set "prd" in the below command to a unix variable
nawk '/^#/ {next} FNR==NR {prd;next} !($0 in prd)'
So, this is what i did
fname=prd // unix shell variable
nawk -v fname=$fname '/^#/ {next} FNR==NR {fname;next} !($0 in fname)'But the value of fname i.e "prd" is not... (8 Replies)
Discussion started by: mohtashims
8 Replies
3. Shell Programming and Scripting
Hi All
We are migrating our projects from unix environment to linux. I tried running a install script which sets up my project, i.e. the directory structure and all. But in the middle of the script i started receiveing following error : nawk: command not found .
So i need to know which... (1 Reply)
Discussion started by: vee_789
1 Replies
4. Shell Programming and Scripting
Hi friends,
I have small query with reg to awk search pattern..
below is my sample file and code which i tried..
$ cat file.txt
xxx,yyyyy,messageID,sha
xxxx,errorcode,messageID,name
in the above sample file - let assume I know the errorcode(2nd record) using which I want to... (2 Replies)
Discussion started by: Shahul
2 Replies
5. Shell Programming and Scripting
Hi,
I am using NAWK command to scan a file (test.txt) and to create new files based on the length of lines in the file test.txt.
My requirement is I need to create test_good with records having line lenght less than 4
and to create test_bad with records having line lenght more than 4. I... (4 Replies)
Discussion started by: sbhuvana20
4 Replies
6. Shell Programming and Scripting
I have a nawk command I use in Solaris....
ps -e -o comm | nawk -F'ora_pmon_' 'NF>1 {print $2}'
However it seems that this command will not work in Linux.
Linux bluemarron 2.6.16.54-0.2.12-smp #1 SMP Fri Oct 24 02:16:38 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
How could I do the same... (2 Replies)
Discussion started by: LRoberts
2 Replies
7. Shell Programming and Scripting
what is this nawk doing?
This is for solaris 10 with trusted extensions.
Level=$(plabel | nawk 'BEGIN {FS='\*"} {PRINT $2}' )
it is supposed to return UNCLASSIFIED or whatever the zone label is.
I understant $() execute this stuff, FS is field separator, print the 2nd field.
Can... (1 Reply)
Discussion started by: djehres
1 Replies
8. Shell Programming and Scripting
well I found lot of topics about awk..about if command in awk..
but I had to implement this:
nawk -F"|" '
$47 ~ /0R0011/ { print > ("/home/user/M/MC.tmp" )}
$47 ~ /0R0012/ { print > ("/home/user/M/DuSI.tmp" )}
$47 ~ /0R0014/ { print > ("/home/user/M/FF.tmp" )}
$47 ~ /0R0018/ { print >... (9 Replies)
Discussion started by: abdulaziz
9 Replies
9. UNIX for Dummies Questions & Answers
I am trying to nawk through a file and if the 24.25.26 charachters in the file are "000" then print a line to a new file in one format, otherwise print a line in a different format.
So far I have the following:
nawk '/^1/ {
if(substr($0,24,3) != 000)... (1 Reply)
Discussion started by: kshelluser
1 Replies
10. Shell Programming and Scripting
Guys, i have an issue. I tried to ran a script and the whole thing was fine.. except when i came to a part,
nawk '
BEGIN {
machine=0
then system prompted that the nawk command was not to be found...
I tried looking for the nawk command by using the "locate" command, and it returns... (5 Replies)
Discussion started by: 12yearold
5 Replies