Search the web
Sign In
New User? Sign Up
geeksthatgawk · for GNU Awk questions & discussions
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 61 - 97 of 221   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
61
Hello friends, can anybody help a clueless awk newbie? Till now I used ocasionally some very basic gawk scripts and they worked fine. I'd like to use some of...
1ns0mn1a
victorvasile
Offline Send Email
Apr 23, 2003
7:54 am
62
... Sadly, gensub() is only available in gawk [like strftime(), mktime() and systime()], so the simple way to do this in other awks is often to use a ...
Peter S Tillier
peter_tillier
Offline Send Email
Apr 27, 2003
8:18 am
63
Hi guys, I have a record that will always start with the format : "Mnt D HH:MM:SS data data data" I would like to strip the first three fields,and put the rest...
Kev Smith
sync24uk
Offline Send Email
Apr 30, 2003
9:20 am
64
Hi Kevin, two possibilities that come to mind are: { for ( i = 4; i <= NF; i++ ) printf( "%s ", $i ); printf( "\n" ) } or if you always know exactly what the...
Maartens Lourens (WMR)
lourenwm@...
Send Email
Apr 30, 2003
12:31 pm
65
Thank you Maartens. ... [Non-text portions of this message have been removed]...
Smith, Kevin
sync24uk
Offline Send Email
Apr 30, 2003
1:05 pm
66
... If the data is separated by single spaces (as it seems to be from your example), then you could use cut: $ echo "Mnt D HH:MM:SS data data data" | cut -d" "...
Peter S Tillier
peter_tillier
Offline Send Email
Apr 30, 2003
10:24 pm
67
I have a file that lists all the sales transactions. Victor MAC 1500 James Mac 2500 Bill Shampoo 150 Victor PC 1000 Bill PC...
Victor Yu
vyu_sed
Offline Send Email
Jul 31, 2003
6:03 am
68
... What have you tried so far? Show us and we'll try to help. Peter S Tillier "Who needs perl when you can write dc, sokoban, arkanoid and an unlambda...
Peter S Tillier
peter_tillier
Offline Send Email
Jul 31, 2003
7:44 pm
69
Here is what I have: { revenue[$1,$2] += $3 sum += $3 } END { for (k in revenue) { split(k,x,SUBSEP) name = x[1] if (x[1] == name) { print x[1], x[2],...
CIS18B Instructor
vyu_sed
Offline Send Email
Jul 31, 2003
10:59 pm
70
I have an output file, ascii from a unix machine, where every field is on a new line with a line ---- Record Start ---- denoting the start of the record and...
timitty2000
Offline Send Email
Aug 1, 2003
3:03 pm
71
... Which doesn't give the required output that Victor asked for! $ cat CIS188.awk # CIS188.awk { revenue[$1,$2] += $3 sum += $3 } END { for (k in revenue) { ...
Peter S Tillier
peter_tillier
Offline Send Email
Aug 1, 2003
6:06 pm
72
Peter S Tillier wrote: Oops, sorry folks, I just realized that I posted the wrong code and output - it as from an earlier version. I'll send the corrected one...
Peter S Tillier
peter_tillier
Offline Send Email
Aug 1, 2003
6:33 pm
73
Peter, Thanks for the code. It works perfectly well. Victor Peter S Tillier <peter_tillier@...> wrote: Peter S Tillier wrote: Oops, sorry folks, I just...
CIS18B Instructor
vyu_sed
Offline Send Email
Aug 1, 2003
8:08 pm
74
Peter, One problem I found out with your code is the Mac's sales figure for James is missing from the report. $cat salesdata bill shampoo 250 james mac 3000 ...
CIS18B Instructor
vyu_sed
Offline Send Email
Aug 1, 2003
8:37 pm
75
... Yes, sorry that was the wrong code that I posted. I'll post the corrected one "real soon now". Apologies once again. Peter S Tillier "Who needs perl when...
Peter S Tillier
peter_tillier
Offline Send Email
Aug 2, 2003
7:55 am
76
Peter, I have come up with another version. It does not quite work yet. But here is the interaction and the code. $cat salesdata victor pc 2500 james pc 2400 ...
CIS18B Instructor
vyu_sed
Offline Send Email
Aug 2, 2003
10:48 pm
77
... OK, here's what I meant to post earlier! $ cat VictorY01.dat Victor MAC 1500 James Mac 2500 Bill Shampoo 150 Victor PC 1000 Bill PC 1200 James PC 1200 $...
Peter S Tillier
peter_tillier
Offline Send Email
Aug 3, 2003
1:42 am
78
Hello Can I use gawk to convert small letters to big letters?. I have a txt file with many first names like this Anders HANS BILL Eddie I want all the names to...
barbapappa732003
barbapappa73...
Offline Send Email
Sep 16, 2003
8:13 pm
79
The quickest way to convert lowercase to uppercase is probably by using tr: cat <filename> | tr "[a-z]" "[A-Z]" In gawk you might be able to use the gsub...
Maartens Lourens (WMR)
lourenwm@...
Send Email
Sep 17, 2003
9:08 am
80
hi all, i am new to awk programming. As i understand, each record from the input file is subjected to all the instructions in the awk script file sequentially....
deeparcot
Offline Send Email
Oct 9, 2003
5:28 am
86
According to the Unicode Consortium, Gawk supports Unicode. But, I haven't been able to find an executable for Windows that seems to work (or I don't know how...
albert_bickford
Offline Send Email
Nov 4, 2003
6:31 am
87
I know notting about unicode, but I noticed that the NoteTab-editor can read and write text in UNICODE format. NoteTab works fine with awk (e.g. liberary ...
Dirk Van Wassenhove
vanwasdi
Offline Send Email
Nov 4, 2003
8:19 am
90
Hi, I would to do this in a gawk script: BEGIN { as="188.772.11.11" while (getline <"../datas"){ split($0,s,";") if(/$as;/) { print $0 } } } but it fails. Of...
bruno_bury
Offline Send Email
Dec 4, 2003
11:08 am
91
Try if ( $0 ~ as ) { print $0 } In general, once you stuff a regular expression into a variable, you cannot use the / / syntax--that's only for literal regular...
Albert Bickford
albert_bickford
Offline Send Email
Dec 5, 2003
2:02 am
92
Hi Thanks for answering - I kinda desperate! I have something like that: for i in $(ls *); do #here it is for files in a loop sed '/something/,/something/d' $i...
uhg_kwant
Offline Send Email
Dec 9, 2003
10:33 pm
93
Hi ya Urszula Hope you're well. It doesn't seem that complex. Are your lines: u> -3.085902 (1a) u> -0.40908 (2a) u> 1.968368 (3a) u> -3.79142 (4a) u> -3.79142...
William
chiron_sun
Offline Send Email
Dec 28, 2003
12:47 am
94
Hi Bruno... I'm confused. If you are asking about awk, there's no $. 'as' I take it is a string RegExp ? Well, "." is a meta-character, or special character....
William
chiron_sun
Offline Send Email
Dec 28, 2003
1:05 am
95
Suppose you want to do something like this: cat file1 | gawk -f script.awk file2 file3 file4 How do you handle this? gawk (GNU Awk 3.1.1) seems to skip over...
jason_quinn
Offline
Apr 9, 2004
9:45 pm
96
... Some UNIX/LINUX utilities allow you to include "-" by itself among a list of filenames on the command line as an indication to read the standard input ...
Albert Bickford
albert_bickford
Offline Send Email
Apr 9, 2004
11:56 pm
97
Where can I get an interpreter for Windows 2000 so that I can run gawk?...
goodmis
Offline Send Email
Apr 27, 2004
1:34 pm
Messages 61 - 97 of 221   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help