On Tuesday 17 of September 2013 12:50:07 erik quanstrom wrote: > On Tue Sep 17 10:04:20 EDT 2013, k...@sciops.net wrote: > > Quoting dexen deVries <dexen.devr...@gmail.com>: > > > awk(1) says, ``[s]tring constants are quoted " ", with the usual C > > > escapes > > > recognized within.'', but \0 seems to terminate internal string > > > reprezentation... > > > > > > so how do i output a real NUL byte? > > > > Does printf not do this? > > no, awk's printf does not do that: > minooka; awk 'BEGIN{printf "%c", utf(0)}' | wc > 0 0 0 > minooka; awk 'BEGIN{printf "%.5s", "12\034567890"}' | xd -1 > 0000000 31 32 1c 35 36 > minooka; awk 'BEGIN{printf "%.5s", "12\0\034567890"}' | xd -1 > 0000000 31 32
printf "%c", 0 -- dexen deVries [[[↓][→]]] Take care of the luxuries and the necessities will take care of themselves. -- L. Long