Professional Documents
Culture Documents
sh
$ cat>>pranesh.txt For x in $*
123 do
456 echo "enter the word to be deleted"
789 read fword
135 sed -e '/'Sfword' /d' $x>output.txt
246 done
798 cat output.txt
~
$ vi prog1a.sh ~
echo “enter the file name” :wq
read fname
echo "enter the starting line number" Output:
read s $ sh pro1b.sh hartsh.txt
echo “enter the ending line number” enter the word to be deleted
read n 789
sed -n $s,Sn\p $fname | cat>newline 123
cat newline 456
~ 135
~ 246
:wq 978