On Mon, Apr 30, 2012 at 09:57:16AM -0400, Chet Ramey wrote:
> Bash reads 128 characters at a time and uses lseek to move the file pointer
> back to the last character `read' consumes. The negative offset to lseek
> causes some kind of problem, but it doesn't return an error. When bash
> goes back
On 4/30/12 2:42 AM, humpty wrote:
> hi,
>
> I encounter a problem when I try to read /proc/sys/dev/cdrom/info
>
> whatever method I try, bash doesn't read the whole file
>
> $ file=/proc/sys/dev/cdrom/info
> $ while read line...done <"$file"
> only outputs the first line
>
> $ exec {foo}<"$file