10 More Discussions You Might Find Interesting
1. AIX
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
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
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
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
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
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
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
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
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
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