Today I Learned

2022/07/02

printf bash shell

That you can unescape newlines with printf "%b" 'escaped\nstring':

escaped='a\nb'
printf "%b" "$escaped"
# a
# b