Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Questiuon about unix
Try this as following:
cat yourfile | awk -F; ' ( $4 == "") { print $0 }' # $4 means your field number from beginning; $0 means whole line.
Good luck!
Don
roland.skoldblom_at_ica.se wrote:
> Hallo everybody,
>
> anyone whom can tell me what the command is to search for an empty field in a unix file.
>
> for instance if you want to find the empty spacelines if some lines looklike:
>
> 1;100;Name;;
> 2;200;Test;45;
> 3;300;Name;;
>
> I would like to find out line nr 1 and 3 here above. Anyone whom could suggest any good?
>
> Maybe this sounds simple but I have tried with /;; and cant find it. If iI use that command then I will get lines with ;;;;;; and i just want lines with two ;;
>
> Thanks in advance
>
> Roland
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author:
> INET: roland.skoldblom_at_ica.se
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Don Yu INET: donyu_at_jhu.edu Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Oct 02 2003 - 09:59:45 CDT