[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reading ascii-0
From: |
Davy Durham |
Subject: |
reading ascii-0 |
Date: |
Tue, 08 Mar 2005 15:26:37 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 |
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?
Thanks,
Davy
- reading ascii-0,
Davy Durham <=