I want to write a sed command that does the following work:
file:
<a>asdfasdf<\s>
<line>hello</line>
<b>adf<\c>
<b>tttttttt<\c>
output:
name=hello
sed -e 's/^[ \t]*//' -n -e '/<line>/s/<[^<]*>//gp;' -e 's/^/name="/g' file
but I can not append "=" after getting the line with front space deleted.
I have an alternate way to get around the problem.
But I don't understand why it wouldn't work.
Any suggestions would be great!!!