Computing.Net > Forums > Unix > Awk script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Awk script

Reply to Message Icon

Name: Prasanna
Date: April 5, 2006 at 03:44:57 Pacific
OS: XP
CPU/Ram: Pentium
Product: Intel
Comment:

I have 4 columns in a record. sometimes the 2nd & 3rd column happens to be a NULL.for those records with 2nd & 3rd column is null the $2 of AWK takes the 4th not null column. I don't want the awk to behave this way. How do I go about in this case.



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: April 5, 2006 at 07:45:05 Pacific
Reply:

A null column means an undefined column. Therefore, you can't say your record has 4 columns if one of them is null. awk has a field seperator, FS, variable that you might be able to use.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Awk script

tweaking William's awk script www.computing.net/answers/unix/tweaking-williams-awk-script/5174.html

awk script help www.computing.net/answers/unix/awk-script-help/5596.html

awk call other awk script? www.computing.net/answers/unix/awk-call-other-awk-script/5574.html