> > Description: > The builtin command echo [-neE] [arg ...] does not work properly > > Repeat-By: > Enter: > echo -E "\ttext" > Expected result: > \ttext > Result: > -E text
Not a bug. POSIX requires that echo prints everything without regards to options, with escape sequences active. If you are using bash in a manner specified by POSIX, such as invoking it by the name /bin/sh, this is the behavior you should expect. However, there is also the xpg_echo option in shopt which controls this somewhat. For example, I just did: $ echo -E "\ttext" $BASH_VERSION $0 \ttext 3.1.14(4)-release /bin/bash $ shopt xpg_echo xpg_echo off > Fix: > Use /usr/bin/echo to work around this problem. /usr/bin/echo from coreutils is not yet fully POSIX compliant, which is why it will accept options even when bash won't. -- Eric Blake _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash