Last active
April 27, 2022 16:01
-
-
Save anikolaienko/94b83f9493f3e2de0b59d0f9db996dec to your computer and use it in GitHub Desktop.
Drop lines with certain text from file
This file contains hidden or 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
if [ "$#" -ne 2 ]; then | |
echo "Illegal number of parameters" | |
return | |
fi | |
cat $1 | grep -v $2 > "$1_tmp" && mv "$1_tmp" $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment