-
-
Save fouad-j/08bddfb2c098c01cb5f66a854e32827b to your computer and use it in GitHub Desktop.
Allow to filter data with awk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'BEGIN {FS=";"} | |
((length($2)>5 || length($3)==7) && length($4)==0) {print "OK " $0; next} | |
{print "KO " $0} | |
' file | |
# input data | |
# col11OK;col12;col13 | |
# col21;col22OK;col23 | |
# col31;col32;col33OK | |
# col41;col42;col43KO;col44 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment