On Tue, Mar 08, 2005 at 03:26:37PM -0600, Davy Durham wrote:
> Hey,
>  I was wondering if it's possible to make the build-in 'read' command 
> not always stop at ascii 0.
> 
> I've got a file "foo" with "asdf\0qwer\n" in it and when I do:
>   read x < foo
> then
>   echo ${#x}
> always returns 4 instead of 9 or 10 because it stopped after "asdf" at 
> the null char
> 
> I've played with setting $IFS, and with -r and -d on the read command 
> itself, but nothing seems to work.
> 
> Is this possible?
Try
    x=`< foo`

-- 
William Park <[EMAIL PROTECTED]>, Toronto, Canada
Slackware Linux -- because it works.


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to