How can I output null-terminated strings in Awk?

前端 未结 4 809
感情败类
感情败类 2020-12-14 09:03

I\'m working on a shell script that will be used by others, and may ingest suspect strings. It\'s based around awk, so as a basic resiliency measure, I want to have awk outp

4条回答
  •  佛祖请我去吃肉
    2020-12-14 09:45

    I've solved printing ASCII 0 from awk. I use UNIX command printf "\000"

    echo | awk -v s='printf "\000"' '{system(s);}'
    

提交回复
热议问题