Re: [Help-bash] /proc/.../cdrom/info not completely read

2012-04-30 Thread Greg Wooledge
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

Re: [Help-bash] /proc/.../cdrom/info not completely read

2012-04-30 Thread Chet Ramey
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