SED - Removing lines /d

 

[prabhucloudxlab@cxln4 ~]$ cat>hello.sh
#! /bin/bash
#Example 3: Removing lines
echo "enter filename to substitute using sed"
read fileName
if [[ -f $fileName ]]
then
sed -e '/WIndows/d; /unix/d ' $fileName
    else
    echo "$fileName doesn't exist"
fi


[prabhucloudxlab@cxln4 ~]$ sh hello.sh
enter filename to substitute using sed
filegrep.txt
learn operating system.
Unix linux which one you choose.
ThIs Is LInux 2000
ThIs Is MAC 4000
ThIs Is LInux 2000