gawk: not found


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting gawk: not found
# 1  
Old 03-06-2012
gawk: not found

While running gawk, OS stating that command not found.
# 2  
Old 03-06-2012
Which OS ?
# 3  
Old 03-06-2012
In your other thread, you said you were using Solaris.

gawk might be in /usr/sfw/bin, but I don't have access to Solaris 10 now, so I might just be making that up.

Otherwise, use nawk as previously suggested, or /usr/xpg4/bin/awk
# 4  
Old 03-06-2012
It's SUN Solaris. gawk not found in /usr/sfw/bin. Also it's not there in /usr/bin. I have used nawk, however ignorecase not working with nawk. Following is my command.

Code:
nawk 'BEGIN {IGNORECASE=1;} /[a-z]/{if(l~2){l=4}}/^PROCEDURE/{if ($1~"PROCEDURE"){if(NF~1){s=$1;l=1; print "SAURABH HERE"};if(NF!~1){s=$1 " " $2;l=2;print "SAURABH HERE2"}}}/^function/{if ($1~"function"){if(NF~1){s=$1;l=1;print "SAURABH HERE3"};if(NF!~1){s=$1 " " $2;l=2;print "SAURABH HERE4"}}}/[a-z]/{if(l~3){s=s FS $1;l=2;print "SAURABH HERE5"};if(l~1){l=3;print "SAURABH HERE6"}}


Last edited by pludi; 03-06-2012 at 10:44 AM..
# 5  
Old 03-06-2012
One alternative is to use tolower and keep the search pattern in lower case.
# 6  
Old 03-06-2012
Quote:
Originally Posted by sbaisakh
It's SUN Solaris. gawk not found in /usr/sfw/bin. Also it's not there in /usr/bin. I have used nawk, however ignorecase not working with nawk. Following is my command.
You could always install it...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Need help with gawk

I am trying to use gawk to search a file and put the second value of the string into a string. gawk -F: '$1~/CXFR/ {print $2}' go.dat Below is the file 'go.dat' ==================== HOME :/ CTMP :/tmp CUTL :/u/rdiiulio/bin CWRK :/u/work CXFR :/u/xfer ... (1 Reply)
Discussion started by: trolley
1 Replies

2. Shell Programming and Scripting

Increment Gawk

Hi, I have a small query with gawk which i'm unsure how to solve. My csv input data is as follows: 1 58352.9 34549 -469.323 LINE_149 2 58352.9 34499 -469.323 LINE_149 3 58352.9 34549 -469.323 LINE_151 4 58352.9 34503.4 -489.841 LINE_151 5 58352.9 34549 -469.323 LINE_152 6 58352.9... (1 Reply)
Discussion started by: theflamingmoe
1 Replies

3. Shell Programming and Scripting

Doubt with gawk

Hi All, I have a doubt with gawk. I have a shell script "cleanup" which calls a gawk script "cleanawk" in it. we have two unix servers epsun532 and wpsun712. So i tested the script in both the environments. In epsun532 while calling the gawk script i just mentioned something like this ... (1 Reply)
Discussion started by: Diddy
1 Replies

4. Shell Programming and Scripting

Help with gawk command

Hi, I have a situation. in a particular file , from the 9th column i have to match a particular pattern . i want a second file which is made by excluding them. I wrote a code like this. gawk '$9~/^(SPI|OTC|SAX)$/' /home/ceh1/ceh_prod/plx_"$mydate"_old.tsv >>... (1 Reply)
Discussion started by: pranabrana
1 Replies

5. Shell Programming and Scripting

Gawk Help

Hi, I am using the script to print the portion of the file containing a particular string. But it is giving error "For Reading (No such file or directory). I am using cygwin as unix simulator. cat TT35*.log | gawk -v search="12345678" ' /mSOriginating /,/disconnectingParty/ { ... (1 Reply)
Discussion started by: vanand420
1 Replies

6. Shell Programming and Scripting

gawk to perl

Hi all I’m looking for a perl equivalent to this command string I need to imbed this in a existing perl script cat file1 | gawk -F"|" '{print $1","$2,",",$3,",",$11 >> "new-file"}' Thank you (4 Replies)
Discussion started by: Ex-Capsa
4 Replies

7. Shell Programming and Scripting

gawk and bash

Hi. I'm having trouble using gawk within a bash script and I can't figure out why. I have a command that takes in a data file with two columns, the first one numbers and the second words. My code takes each line, and prints the word its corresponding number of times. The code works from the... (2 Replies)
Discussion started by: cdislater
2 Replies

8. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies

9. Shell Programming and Scripting

gawk HELP

I have to compare records in two files. It can be done using gawk/awk but i am unable to do it. Please help me File1 ABAAAAAB BC asa sa ABAAABAA BC bsa sm ABBBBAAA BC bxz sa ABAAABAB BC csa sa ABAAAAAA BC dsa sm ABBBBAAB BC dxz sa File 2 ABAAAAAB BC aas ba ABAAAAAB BC asa sa... (6 Replies)
Discussion started by: sandeep_hi
6 Replies

10. Shell Programming and Scripting

rs and ors in gawk ...????

:D dear members I have a good knowledge of gawk and seem to do quite well with it.. but I have never understood what the use of the rs and ors are for or how they are used.. i am thinking they are for seperating lines and paragraphs but i have absolutely no idea how to make it work, if that is what... (2 Replies)
Discussion started by: moxxx68
2 Replies
Login or Register to Ask a Question