[prabhucloudxlab@cxln4 ~]$ cat>hello.sh
#! /bin/bash
#Substitute word
echo "enter filename to substitute using sed"
read fileName
if [[ -f $fileName ]]
then
sed 's/linux/Unix_Unix_Unix/gi' $fileName
else
echo "$fileName doesn't exist"
fi
[prabhucloudxlab@cxln4 ~]$ sh hello.sh
enter filename to substitute using sed
filegrep.txt
unix is great os. unix is opensource. unix is free os.
learn operating system.
Unix Unix_Unix_Unix which one you choose.
uNix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.
ThIs Is Unix_Unix_Unix 2000
ThIs Is WIndows 3000
ThIs Is MAC 4000
ThIs Is Unix_Unix_Unix 2000
ThIs Is WIndows 3000