I need to use something bash related to remove everything inside of brackets.
For example. In the following:
abc<def>ghi<jkl>mno
the result should be:
abcghimno
I need to use something bash related to remove everything inside of brackets.
For example. In the following:
abc<def>ghi<jkl>mno
the result should be:
abcghimno
What have you tried?
please delete - wrong solution.
echo 'abc<def>ghi<jkl>mno' | awk '{gsub(/<[^>]*>/, "");$1=$1}1'
abcghimno
Jotne, a sed solution would look nicer!
Or perl with its *? minimum match
perl -pe 's/<.*?>//g'