10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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