bash read oddity
Got a strange situation happening on a friends Debian box. I found the
problem by debugging his ALSA startup problems. Turns out that he's
getting some extra character added to the output of "read" command.
The following commands replicate this:
$ set -x
$ awk '/^((alias)|(probe)) +snd-card-[0-9]/ {print $3}' \
/etc/modules.conf | ( while read -e line; do echo $line; done; )
on my friend's system this results in:
+ awk '/^((alias)|(probe)) +snd-card-[0-9]/ {print $3}' /etc/modules.conf
+ read line
+ echo $'snd-emu10k1\r'
snd-emu10k1
+ read line
on my system this results in:
+ awk '/^((alias)|(probe)) +snd-card-[0-9]/ {print $3}' /etc/modules.conf
+ read -e line
+ echo snd-ymfpci
snd-ymfpci
+ read -e line
Both systems are running the same versions of bash and libc6. Any
ideas?
--
Jamin W. Collins
Reply to: