File Name: case.txt
grep to find all lines containing a
~. Use the
-v flag to select only non-matching lines. If you want to put this into the original file, first store it in a temporary file, then rename it to the original file. (Make sure temp.txt doesn't already exist in the current directory).
grep -v "~" input.txt > temp.txt | mv temp.txt input.txt