Doubt with gawk


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Doubt with gawk
# 1  
Old 09-16-2011
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

code :
Code:
$more cleanup
#!/bin/ksh
..
..
gawk -f  cleanupawk filename
..
..
//This worked fine, gawk script got executed

In wpsun712 when i execute the same script. i get a error like
Code:
ksh: gawk:  not found


I just want to know how the gawk editor will work. Do we need to have this gawk editor in the environment??
Just need some info about how we need to have the gawk instance.

Thanks,
Diddy

Last edited by pludi; 09-16-2011 at 04:06 AM..
# 2  
Old 09-16-2011
"gawk" is not an editor. its a tool/language. You must have "gawk" available on your system just like any other commands.
Perhaps its not present ( not in PATH environment at least ) on your second server.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Gawk command

Hello experts :) I have a question about Gawk command on AIX, could someone tell me the function of this command ? i have a script which has a gawk command : /usr/bin/xmllint --format /data/work/PROU/aggregates.flat.xml | gawk '! /<!--.*-->/ {print $0}' | gawk -f... (3 Replies)
Discussion started by: rimob
3 Replies

2. 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

3. Shell Programming and Scripting

Gawk help (windows)

Someone help please. I tried to do it with findstr but I couldn't, so now I'm trying to output the following numbers from this text file with gawk (what I need is in bold down below): Analyzing pool.ntp.org (1 of 1)... delayoffset from local clock Stratum: 2 Warning: Reverse name... (18 Replies)
Discussion started by: harris_t
18 Replies

4. 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

5. 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

6. Shell Programming and Scripting

unable to use GAWK

The following message is being prompted while using gawk in my ksh : gawk: not found any idea how to fix this ? (1 Reply)
Discussion started by: sinpeak
1 Replies

7. Shell Programming and Scripting

gawk and gensub

Hi, $ echo "Hellooo" | gawk '{print gensub(/o{3}/, "z", 1)}' doesn't return "Hellz" as expected while: $ echo "Hellooo" | awk '{print gensub(/o+/, "z", 1)}' produces "Hellz" correctly. Are the {m,n} quantifiers not supported in gensub? I know that sub or gsub could do the job. It's just an... (2 Replies)
Discussion started by: ripat
2 Replies

8. Shell Programming and Scripting

gawk and strftime()

Strange behaviour of the strftime() function from gawk (3.1.5): $ awk 'BEGIN{print strftime("%T", 3600)}' > 02:00:00 $ awk 'BEGIN{print strftime("%T", 0)}' > 01:00:00 Obviously something with DST but I can not figure out why? To me 3600 epoch seconds remains 01:00, DST or not. From... (2 Replies)
Discussion started by: ripat
2 Replies

9. Shell Programming and Scripting

gawk will work or not ?

Hai I am using bash-2.03$ bash --version GNU bash, version 2.03.0(1)-release (sparc-sun-solaris) I am not able to use gawk command its showing command not found , why ? Eg: awk 'NR==1' fix.txt | gawk 'BEGIN { FIELDWIDTHS = "3 2" } { printf($1"|"$2); }'... (3 Replies)
Discussion started by: tkbharani
3 Replies

10. 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
Login or Register to Ask a Question