Awk to remove Blank lines in pipedelimited
Help me correct this.
nawk -F"|" '{a=$0; gsub(FS, "",a); if(length(a)) print}' file1
nawk -F"|" '{gsub(FS, "",$0);if(length($0)) print}' file1
Awk to remove Blank lines in pipedelimited
Help me correct this.
nawk -F"|" '{a=$0; gsub(FS, "",a); if(length(a)) print}' file1
nawk -F"|" '{gsub(FS, "",$0);if(length($0)) print}' file1
Try...
nawk -F'|' '{if (NF > 0) print}' file1
awk '{a=$0;gsub(/[|| ]/,"");if(length($0))print a}' file
-Devaraj Takhellambam
I tried the below code this works
nawk -F'[|]' '{a=$0; gsub(FS, "",a); if (length(a)) print }' file1
Why do i have to use please help
Not sure may be this is special condition for awk