Hi team,
Well i have been asked to make use of automation scripts for my host production box.. .And i hope u will help me with the same.
#script as below:
a)when i run script it should ask the person to key in..(means should be interactive)
b) it should search a file
c) it should replace a word/ multiple word in a file and prompt user for more changes once he done with
and finally..
D) delete the line rows... (any rows- mentioned by the user on files)
I am done with the 1st script but i am having probs with the second and third
2)I knw sed will replace
sed 's/(word)/(with-word)'/ file name
3)and sed 'line,lined' file
but how to use in the below script and ask the user for more inputs..
Please provide me with the earliest..
thankin you once again
PS: Moderator pls dont treat this mail as repetative
regards
whizkidash
vi showme.sh(script name)
echo "type the file to be search"
read fname
if ls -lart | $fname
then
echo " File exist"
else echo " File fail"
------(uptil here it run fine)
echo " type the file to be replace/or substituted"
read tname