I want to replace @@ with ^ and ¤¤ with a newline in a file. To do this I wrote the code below, but it feels like there is a more elegant solution then calling gawk twice. Can anyone tell me if there is one?
cat test.txt | gawk '{ gsub("@@", "^"); print }' | gawk '{ gsub("¤¤", "\r\n"); print }'