[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using NUL in scripts

From: Jan Schampera
Subject: Re: using NUL in scripts
Date: Thu, 27 Sep 2007 05:50:19 +0200
User-agent: IceDove (X11/20070607)

Mike Frysinger schrieb:
> is it even possible to utilize NUL in scripts ?  or does bash just strip it 
> out ?  for example, trying to work with binary data:
> foo=$(<binary-file)
> echo "${foo}" > new-file
> the "new-file" will be exactly "binary-file" if all NUL bytes are stripped out
> or perhaps i want to take an arg list, append a string, and run a command on 
> it ... but i cant pass it straight as it may be too large, so i need to xargs 
> it ... so i'd do something like:
> echo ${@/%.moo/.foo$'\000'} | xargs -0 rm -f
> but this doesnt work since the $'\000' gets stripped
> -mike

We also once inspected that (more general "binary data"), the result was:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]