Link to home
Start Free TrialLog in
Avatar of GAUTAM
GAUTAMFlag for United States of America

asked on

NAWK command help

Hi experts...
I am a newbie to UNIX.I found an Nawk command and have no idea what it means.Can anyone explain this command bit by bit
nawk -F "|" '{i=1;while(i<=NF){gsub(/^[ \t]+|[ \t]+$/,"", $i); if (length($i)>0) printf("%s|",$i) ; if (i==NF){printf("\n")};  i++}}' $rej_list | sed -e 's/.$//' >! $rej_list_fmt
Please help...

Avatar of GAUTAM
GAUTAM
Flag of United States of America image

ASKER

Hi experts can anyone help me on this...
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GAUTAM

ASKER

@woolmilkporc:This is run in tcsh shell.Is tcsh shell obsolete?
No, tcsh is not at all obsolete.

csh is rather old and a bit inconvenient, but is not obsolete either.

What I meant to say is that the redirection format ">!" is no longer mandatory for non-existing output files in neither shell, but can still be used in csh and tcsh nonetheless. ksh and bash don't recognize this format, however.

Thx for the points!

wmp
Avatar of GAUTAM

ASKER

Thx for the reply.