Shell script that deletes all lines containing a specified word in one or more files supplied as arguments to it Post author:Educate Post published:October 11, 2023 Post category:Shell Script Post comments:0 Comments if [ $# -lt 1] then echo “ Check the arguments once” exit fi echo “Enter a word” read word for file in $* do grep –iv “$word” $file | tee 1> /dev/null done echo “ lines containing given word are deleted” You Might Also Like Execution of various file/directory handling Unix/Linux commands September 25, 2023 Shell script to find gcd and lcm of given two numbers September 15, 2023 Shell program to compression and decompression of files using gzip and gunzip September 20, 2023 Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.