Antonio Macchi wrote: >> $ printf "\x00\n" | cat -A >> ^@ > > it works, so why... > > $ printf $'\x00' | cat -A > $
Read carefully ALL the answers you've been given. The short version is that $'\x00' is interpreted by bash itself, while '\x00\n' is interpreted by printf only. But DO READ the answers you've got, because your question denotes you haven't done that.