If I have the text:
aaaaaaaaa
#some info
other rows
end row#
another info
How could I extract only the text between the characters # obtaining only:
some info
other rows
end row
I was trying with sed in this way:
echo -e "aaaaaaaaa\n#some info\nother rows\nend row#\nanother info" |
sed -n -e '/\#/,/\#/p'
but it gives me also the character #. Is there a way to remove # using sed?
tr -d "#", eg.sed -n '/#/,/#/p' | tr -d "#"#here)