I tried to treat entire text as one line by using -z option, but then the .* widcard failed:
Code: Select all
echo -e 'firstline\n2ndline' | sed -z -E "s|.*|x|"
(outputs nothing)
When -z is removed, it correctly matches:
Code: Select all
echo -e 'firstline\n2ndline' | sed -E "s|.*|x|"
output:x
x
I'm running this on Debian 11.
Any ideas why this happens?