svn commit: [25968] trunk/busybox/shell

David N. Lombard dnlombar at ichips.intel.com
Mon Apr 13 14:48:33 UTC 2009


On Wed, Apr 08, 2009 at 02:06:56PM -0700, Mike Frysinger wrote:
> On Wednesday 08 April 2009 11:23:47 David N. Lombard wrote:
> > On Sun, Apr 05, 2009 at 04:32:19PM -0700, Mike Frysinger wrote:
> > > fwiw, POSIX allows implementations to ignore such binary characters when
> > > working with variables and such.  bash does it too.
> > >
> > > of course, this doesnt apply to pipes ...
> >
> > Is this what you meant?
> >
> >     $ wc -c bar
> >     4840 bar
> >     $ echo "$(<bar)" > foo ; wc -c foo
> >     2694 foo
> >     $ echo "$(<bar)" | wc -c
> >     2694
> >     $
> 
> no, i mean:
> 	cat bar | wc -c

Oh.  But, the shell isn't involed in that other than setting up the
pipes.  It's identical to these:

	wc -c bar
	wc -c < bar

And, well, they better all be the same ;)

At the end of the day, it's all about the assignment of the file's
contents to a shell variable.  After that, nothing else matters.

-- 
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.


More information about the busybox mailing list