4
In UNIX: in folders there are files with .sas
(programs) extension and files with .sas7bdat
(tables).
I need to find programs (and NOT tables) which contain the text "liasse". I tried by launching this command:
grep -rli liasse *.sas ./
In the result I can see a table name. What should be the command to retrieve only programs?
I tried find . -name '*.sas' -print0 | xargs -0 grep -li liasse but it returns "The -0 flag is not valid." the full respons is find: 0652-017 -print0 is not a valid option. xargs: The -0 flag is not valid. Usage: xargs [-ptx] [-e[EndOfFileString]] [-E EndOfFileString] [-i[ReplacementString]] [-I ReplacementString | -L Number |-n Number ] [-l[Number]] [-s Size] [Command [Argument ...]] – Nasser – 2018-01-11T08:52:05.533
Nasser: Your system seems to have no support for "xargs -0". Not sure why. Just use the first variant (find -exec) instead. – vog – 2018-01-11T09:19:24.923