Gawk command


 
Thread Tools Search this Thread
Operating Systems AIX Gawk command
# 1  
Old 07-20-2016
Gawk command

Hello experts Smilie


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 :
Code:
/usr/bin/xmllint --format /data/work/PROU/aggregates.flat.xml | gawk '! /<!--.*-->/ {print $0}' | gawk -f "/data/work/PROU/parseAGG.awk" GCPATH="/data/work/PROU"


Thank you,

Rimob.



Moderator's Comments:
Mod Comment Please DON'T IGNORE the requests to use code tags as required by forum rules!

Last edited by RudiC; 07-20-2016 at 09:12 AM.. Reason: Added (i)code tags.
# 2  
Old 07-20-2016
gawk is the GNU variant of the awk command which is a versatile text processing tool. In above script, the first gawk removes all lines from stdin that don't contain the <!--.*--> string, where .* is a wild card matching any multi character combination, and prints the reminder to stdout which is piped to another gawk that runs an - unknown to us - script (/data/work/PROU/parseAGG.awk) on it using a variable called GCPATH.
This User Gave Thanks to RudiC For This Post:
# 3  
Old 07-20-2016
Thank you so much Smilie
# 4  
Old 07-20-2016
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

Interpretation needed for gawk command

Hi All I am running a insatll script in linux which installs the project. Could you please help in interpreting this command gawk '{ if (substr($1,0,1) == "\047") gsub("^\047+|\047+$", "", $1); print }' where $1 = BBME Thanks (1 Reply)
Discussion started by: vee_789
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. Programming

need help with gawk script

hi i've already created this script. When I execute the script it takes the argument and compares it to the 3rd column of the script. What I was wondering if I could get some help with is. I want to add another column to the script and it will be the result of a set number for example, (2000 - 3rd... (3 Replies)
Discussion started by: gengar
3 Replies

6. Windows & DOS: Issues & Discussions

Cannot run command line scripts in perl or gawk

I originally posted this to a different forum (I am a new Perl user) and realized the error so I will ask here. I am on a WindowsXP machine trying to run perl and gawk scripts from the command line. I have perl and gawk installed and environment set to C:\perl\bin and cannot get a script to... (2 Replies)
Discussion started by: 10000springs
2 Replies

7. Shell Programming and Scripting

Gawk filter

People, Ive been trying to make a script but i just cant figure it out. Problem/ Case: I have a logfile.txt that contains data. The only two things i need to filter on = $1 (date), $6 (errorcode). In the script i am trying to make, u need to fill in a date. So he searches on that date... (11 Replies)
Discussion started by: Pow3R
11 Replies

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

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

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