The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Search Results
Showing results 1 to 2 of 2
Search took
0.00
seconds.
Search:
Posts Made By:
TRB
Forum:
Shell Programming and Scripting
05-16-2011
4
looping in awk
1,934
Posted By
TRB
How about this: echo "xx yy zz" | awk...
How about this:
echo "xx yy zz" | awk 'BEGIN{FS=" "}{ for (i=1; i<=(NF-1); i++) { printf("%s,", $i); } printf("%s\n", $NF); }'
Forum:
AIX
09-16-2010
7
Help with syntax using AWK
5,837
Posted By
TRB
This snippet handles both a quoted 4th field and...
This snippet handles both a quoted 4th field and an unquoted 4th field
as long as the 4th field is always two characters long:
awk -F',' \
' { if ( substr($7,2,2) == "01" || $4 == "01"...
Showing results 1 to 2 of 2
Member Badges and Information Modal
×