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 Shell script that accepts one or more file name as arguments and converts all of them to uppercase, provided they exist in the current directory October 6, 2023 Shell program to find and display largest and smallest of three numbers July 29, 2023 Shell script that accepts a list of file names as its arguments, counts and reports the occurrence of each word that is present in the first argument file on other argument files October 12, 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.
Shell script that accepts one or more file name as arguments and converts all of them to uppercase, provided they exist in the current directory October 6, 2023
Shell script that accepts a list of file names as its arguments, counts and reports the occurrence of each word that is present in the first argument file on other argument files October 12, 2023