Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

AWK | Forum profile

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.

Site: Tek-Tips Forums - AWK (site profile, domain info tek-tips.com)
Title: AWK
Url: http://www.tek-tips.com/threadminder.cfm?pid=271
Users activity: 28 posts per thread
Forum activity: 5 active threads during last week
 

Posting activity on AWK:

  Week Month 3 Months
Threads: 5 17 61
Post: 17 54 168
 

AWK Posting activity graph:

Posts by:  day  week  month 

Top authors during last week:

Name
Posts
mguha06
5
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.
mrr
3
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...
vgersh99
3
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> | +----------------------------+
dpedro
2
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...
CaKiwi
2
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...
feherke
1
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/
Annihilannic
1
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::

Tek-Tips Forums
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> | +----------------------------+
Thread:  Show this thread (8 posts)   Thread info: Selecting values diagonally in a matrix file Size: 482 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Selecting values diagonally in a matrix file :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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;...
Thread:  Show this thread (5 posts)   Thread info: MATCH AND ADD XY Size: 2,079 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: MATCH AND ADD XY :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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/
Thread:  Show this thread (4 posts)   Thread info: substr() strange behaviour Size: 233 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: substr() strange behaviour :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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.
Thread:  Show this thread (3 posts)   Thread info: delete line if contains pattern Size: 317 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: delete line if contains pattern :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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.
Thread:  Show this thread (5 posts)   Thread info: awk in sh and bash works differently??? Size: 312 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: awk in sh and bash works differently??? :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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.
Thread:  Show this thread (6 posts)   Thread info: Awk while loop question Size: 381 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Awk while loop question :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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/
Thread:  Show this thread (3 posts)   Thread info: multiplication using awk Size: 545 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: multiplication using awk :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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 ...
Thread:  Show this thread (5 posts)   Thread info: delete or extract columns by list of identifiers Size: 2,046 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: delete or extract columns by list of identifiers :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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?
Thread:  Show this thread (6 posts)   Thread info: match lines with ";" caracter Size: 506 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: match lines with ";" caracter :: AWK :: Tek-Tips Forums"
Tek-Tips Forums
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 ]+/ { ...
Thread:  Show this thread (4 posts)   Thread info: Array printing and if statement Size: 5,297 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Array printing and if statement :: AWK :: Tek-Tips Forums"
 

Hot threads for last week on AWK::

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> | +----------------------------+
Thread:  Show this thread (8 posts)   Thread info: Selecting values diagonally in a matrix file Size: 482 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Selecting values diagonally in a matrix file :: AWK :: Tek-Tips Forums"
AWK
RE: MATCH AND ADD XY - 5 new posts
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;...
Thread:  Show this thread (5 posts)   Thread info: MATCH AND ADD XY Size: 2,079 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: MATCH AND ADD XY :: AWK :: Tek-Tips Forums"