I have multiple files with .txt extention, In all files some lines having "?" symbol, so how to remove those whole line in all files using single AWK/perl command
I used following command:
perl -pi -e "s/\?//g" *.txt
but it remove only ? symbol not whole line, so please help me to remove whole line contain "?" symbol.
One perly way:
perl -ni -e 'next if /\?/; print' *.txt
-n flag loops over the file the same way as
-p, however it doesn't automatically print the line; it leaves that responsibility to you. So what we do is loop over all lines, skip the ones with a
next(), and print all others.