sed multiline substituir
este é o meu arquivo de texto de amostra:
asdas //<<<TAG this should be removed //TAG>>> this should be there //<<<TAG T > asd asd //TAG>>>
para o qual eu quero o / p como:
asdas this should be there
Basicamente eu estou tentando encontrar linhas entre "// << >>" (incluindo essas linhas também) e excluí-los.
Eu tentei usar sed
sed -n '1h; 1! H; $ {; g; s /// <<] * TAG >>> // g; p;}' <test.txt
Mas alguns como não produziu saída correta. A segunda tag que continha o símbolo ">" falhou na regex. Não tenho certeza onde estou errado?
Alguma ideia de como fazer isso?