|
More site info...
|
|
Forum profile page for AWK on http://www.tek-tips.com.
This report page is the aggregated overview from a single forum: AWK, located on the Message Board at http://www.tek-tips.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "AWK" on the Message Board at http://www.tek-tips.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on AWK:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
5
|
17
|
61
|
|
Post:
|
17
|
54
|
168
|
|
|
AWK Posting activity graph:
|
Top authors during last week:
user's latest post:
Selecting values diagonally in a...
Published (2009-12-22 15:52:00)
I am using gawk now. It works. I think, when the starting row number is greater than the ending row number, it does not output correctly. Anyhow, it is a great code. I am giving you all the stars that i can give.
user's latest post:
MATCH AND ADD XY
Published (2009-12-18 23:47:00)
Thanks CaKiwi, I changed your code of: if (match($0, "SUB ")) { count=0;type ="SUB";group_id++;subt=$2;if (int(subt/10)==4)subt=4;next...
user's latest post:
Selecting values diagonally in a...
Published (2009-12-22 12:32:00)
This is not what's been posted originally. vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
user's latest post:
substr() strange behaviour
Published (2009-12-15 08:43:00)
in short input was: <phone artificial="false" id="1177" platform="3" producer="9" wap="true"> <name> Asus M530w</name> <identifier> M530w</identifier> <info> Asus M530w</info> <ua> Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile...
user's latest post:
MATCH AND ADD XY
Published (2009-12-19 11:07:00)
I'm glad it's working for you, but the line if (subt==4);next has exactly the same effect as just next The if statement checks if subt is 4 and executes everything up to the semicolon, i.e. does nothing. Take out the "if (subt==4);" part and see what happens. The statement if (int(subt/10)==4)subt=4 that I had in my original solution was to handle the case of sub being in the 40's and having only 4 points but it looks...
user's latest post:
substr() strange behaviour
Published (2009-12-15 07:57:00)
Hi And what is the input ? Feherke. http://free.rootshell.be/~feherke/
user's latest post:
substr() strange behaviour
Published (2009-12-15 17:14:00)
Perhaps windows line endings in the XML file? Annihilannic.
|
|
|
|
Latest active threads on AWK::
Started 4 days, 18 hours ago (2009-12-21 16:55:00)
by vgersh99
nawk -v s='1,2' -v e='4, 4' -f mg.awk myMatrix.txt mg.awk: CODE BEGIN { split(s,sA, ",") split(e,eA, ",") } NR> =sA[1] && NR<=eA[1] {print $(sA[2]+ c++)} vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Started 1 week ago (2009-12-18 18:20:00)
by CaKiwi
Try this BEGIN { OFS="," } { fd_1 ="A" fd_2 = "B" if ($0 ~ /^H/) next if ($0 ~ /^ *$/) next if ($0 ~ /^$/) next if (match($0, " EOF")) next if (match($0, "ADD")) { count=0;type ="AREA";group_id="0";next } if (match($0, "SUB ")) { count=0;type ="SUB";group_id++;subt=$2;if (int(subt/10)==4)subt=4;...
Started 1 week, 4 days ago (2009-12-15 07:57:00)
by feherke
Hi And what is the input ? Feherke. http://free.rootshell.be/~feherke/
Started 2 weeks, 1 day ago (2009-12-10 19:05:00)
by Annihilannic
You can just tie your regexp to the beginning of the line using ^ , e.g. /^(How|Is)/ should work in awk . Annihilannic.
Started 2 weeks, 2 days ago (2009-12-09 18:42:00)
by Annihilannic
I don't understand how it worked anywhere... are you certain it wasn't modified? All occurrences of $PRINT should just be print . Annihilannic.
Started 2 weeks, 4 days ago (2009-12-07 19:22:00)
by Annihilannic
Let's see your code so far... which part are you stuck with? (There's no point in doing a tutorial if we just give you the solution ) Annihilannic.
Started 3 weeks, 1 day ago (2009-12-04 10:30:00)
by feherke
Hi I guess it would be useless to ask you what have you tried so far. CODE awk 'BEGIN{m=1}{m*=$0; printf"%s%s",(NR> 1?"*":""),$0}END{print"="m}' /input/file Tested with gawk and mawk . Feherke. http://free.rootshell.be/~feherke/
Started 3 weeks, 3 days ago (2009-12-01 13:08:00)
by feherke
Hi Something like this ? CODE master # cat Felix-head.txt w r y i master # cat Felix-data.txt q w e r t y u i o p a s d f g h j k l ; z x c v b n m , . / master # awk 'FNR==NR{h[$0]=1;next}FNR==1{for(i=1;i<=NF;i++)if( $i in h)n[i]=1}{for(i=1;i<=NF;i++)if(i in n)printf"%s ",$i;print""}' Felix-head.txt Felix-data.txt w r y i s f h k x v n , Tested with gawk and mawk . But your ...
Started 3 weeks, 6 days ago (2009-11-28 17:31:00)
by PHV
You may try something like this: CODE awk '!/^[ \t]*;/' foo.conf Hope This Helps, PH. FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions? FAQ181-2886: How can I maximize my chances of getting an answer?
Started 1 month ago (2009-11-26 06:21:00)
by feherke
Hi I would put that awk code into a file. Is easier to edit. CODE #!/usr/bin/awk - f function striptags () { return gsub (/<[^> ]*> /, "" ) } BEGIN { n = "#n/a" } /<[ Hh ] 1 > / { getline arr [ "title" ]= $0 } / week =[ 0 - 9 ]+/ { striptags () arr [ "release" ]= $0 } # ... etc / lang -[ 0 - 9 ]+/ { ...
|
|
Hot threads for last week on AWK::
Started 4 days, 18 hours ago (2009-12-21 16:55:00)
by vgersh99
nawk -v s='1,2' -v e='4, 4' -f mg.awk myMatrix.txt mg.awk: CODE BEGIN { split(s,sA, ",") split(e,eA, ",") } NR> =sA[1] && NR<=eA[1] {print $(sA[2]+ c++)} vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Started 1 week ago (2009-12-18 18:20:00)
by CaKiwi
Try this BEGIN { OFS="," } { fd_1 ="A" fd_2 = "B" if ($0 ~ /^H/) next if ($0 ~ /^ *$/) next if ($0 ~ /^$/) next if (match($0, " EOF")) next if (match($0, "ADD")) { count=0;type ="AREA";group_id="0";next } if (match($0, "SUB ")) { count=0;type ="SUB";group_id++;subt=$2;if (int(subt/10)==4)subt=4;...
|
|