This is the msplit script that splits a unix mailbox file into many separate files. Could someone please help me translating it to gawk? Daniel msplit.pl ...
... You are the geek! :) It worked exactly like "msplit.pl". I made some modifications. Code follows: #!/bin/awk # msplit splits a unix mailbox file into many...
... I just woke up, so forgive the brain-fart ... You know, you can easily search Google's Usenet archive for any previous posts in comp.lang.awk. :)...
Hello listers, can anybody tell me wether and how the 'system' function will accept the 'start' command (on a xp box)? All I want is to open a local saved web...
joi 1/2/2003 Peter S Tillier a scris despre: "[Geeks that Gawk] system()" ... yes, a lot :-( all I get is this message: "start: mypage.html is not a valid ...
I wanted to stop that insanity and re-installed my XP. Now the awk 'system' function seems to work normally. Sorry for bothering you with a non-awk problem... ...
Hello, I'm in need to write a parser script. To not re-invent the wheel, does anybody know of a sample I could use as a frame/template? The problem is that...
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...
... 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 ...
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...
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@...
Apr 30, 2003 12:31 pm
65
Thank you Maartens. ... [Non-text portions of this message have been removed]...
... 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" "...
... 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...
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],...
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...
... 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 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, Thanks for the code. It works perfectly well. Victor Peter S Tillier <peter_tillier@...> wrote: Peter S Tillier wrote: Oops, sorry folks, I just...
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 ...
... 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, 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 ...