So match "| |"? Or perhaps "|[ ]?|"? Or will that not work? On Tue, Jun 1, 2010 at 5:22 PM, Gary Hanley <gary@hanley.net> wrote:
There will be a space.
-- Gary
On 06/01/2010 05:14 PM, Jorden M wrote:
What will happen if the field is null? Two pipes? Or will there be space in between?
On Tue, Jun 1, 2010 at 5:08 PM, Gary Hanley<gary@hanley.net> wrote:
Thanks, but that won't help here. Maybe I should have mentioned the fields are delimited by "|" and there is more than eight fields per record.
I think this might be more complicated than I assumed. Thanks anyway.
-- Gary
On 06/01/2010 04:26 PM, Jorden M wrote:
Just check NF.
On Tue, Jun 1, 2010 at 4:00 PM, Gary Hanley<gary@hanley.net> wrote:
Wow, what's wrong with me? I'm trying to parse a file to eliminate any line from the file to the output where a particular field is is null. The 8th field in this case.
I can't get it right! I haven't done an awk script in a long time but this should be simple stuff.
Basically I'm trying to do:
cat file | awk -F\| '$8 !~<NULL expression> {print}'
Any help would be appreciated.
Thanks.
-- Gary _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug