sed -e :a -e 's/<[^>]*>//g;/</N;//ba' a2.html -removes html tags
and
sed -i 's/YOURS TRULY/Joe Bob/' a2.html
Replaces a string with another string
can i make it into one string?
sed -e :a -e 's/<[^>]*>//g;/</N;//ba' a2.html -removes html tags
and
sed -i 's/YOURS TRULY/Joe Bob/' a2.html
Replaces a string with another string
can i make it into one string?
Hi boyboy1212,
To join sed commands is needed -e
option, for example:
If you have this command
sed 's/search_1/replace_1/' input
and this one
sed 's/search_2/replace_2/' input
You can write with one sed invocation as follow:
sed -e 's/search_1/replace_1/' -e 's/search_2/replace_2/' input
Or more compact like this:
sed -e 's/search_1/replace_1/;s/search_2/replace_2/' input
*merged with ";" between end and begin of each part
Try doing this and see what happens.
Hope it helps.
Regards
Should you be using the "-i" argument in the first script as well? If not, then will you want to replace YOURS TRULY on the file before removing the tags or after?