found 573287 0.5.4-12 notfound 573287 0.5.5.1-4 quit On Wed, May 05, 2010 at 07:58:51AM +0100, -=}*/{=- wrote: > mmm... isn't the echo command an external command?... > > whereis echo > echo: /bin/echo /usr/share/man/man1/echo.1.gz > /usr/share/man/man3/echo.3ncurses.gz
It's both $ bash -c 'type echo' echo is a shell builtin $ dash -c 'type echo' echo is a shell builtin $ which echo /bin/echo $ > .. should behave the same on different shells, right? Unfortunately it doesn't, since ages. That's why printf should be used instead in portable scripts. > i still went and tested your sugestion on my lenny, which gave me also > diferent results for bash and dash... > > #bash: > read line && printf "%s\n" "$line" > \\ \\ \\ \\ > \ \ \ \ > > read -r line && printf "%s\n" "$line" > \\ \\ \\ \\ > \\ \\ \\ \\ > > #dash: > read line && printf "%s\n" "$line" > \\ \\ \\ \\ > \\\\ This seems to be a bug that affects dash in Debian/stable. It's fixed in dash available in Debian/testing and unstable. $ dpkg -l dash |grep ^ii ii dash 0.5.5.1-4 POSIX-compliant shell $ dash -c 'read line && printf "%s\n" "$line"' <<\EOT \\ \\ \\ \\ EOT \ \ \ \ $ Thanks for reporting this, Gerrit. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org