I have one File named "txt_file"
# cat txt_file
<DBType>RT</DBType>
<AppType>RT</AppType>
--------------------------------------------------
I want replace "<AppType>RT</AppType>" to
<AppType>XY</AppType> in txt_file and output redirect to Newfile
--------------------------------------------
I have a scipt file named "add.sh"
#cat add.sh
#!/bin/bash
cat txt_file |sed 's'/<AppType>RT</AppType>'/'<AppType>XY</AppType>/'g' >Newfile
___________________________________________
But when I am running that script(add.sh) I am getting error
"add.sh: line 2: AppType: No such file or directory"
It might be syntax problem.
Coul you please help me out.
Thanks in advance!!
Sanjay
vino
2
sed -e "s+<AppType>RT</AppType>+<AppType>XY</AppType>+g" txt_file >Newfile
Perfect Vino Brother !!!
Thanks
Sanjay