Re: [PATCH] latest ash has broken 'echo' command
Herbert Xu <herbert@gondor.apana.org.au> writes:
> On Sun, Oct 24, 1999 at 11:56:04PM -0400, Raul Miller wrote:
> > If someone wants to change the world (I'm most concerned about the linux
> > kernel source, debian policy and existing debian scripts, but I expect
> > that there are other issues as well), I have no objection to a later
> > change to debian policy which removes all references to echo -n.
>
> Please don't make the kernel source sound like the end of the world.
> They've used bashisms for a long time and still do. So they don't
> affect this argument at all.
Sorry to jump in (and maybe has been brought up before), but there's
one reason, IMHO, for echo -n support in ash: configure. The autoconf
macro responsible is:
dnl Check whether to use -n, \c, or newline-tab to separate
dnl checking messages from result messages.
dnl Idea borrowed from dist 3.0.
dnl Internal use only.
AC_DEFUN(AC_PROG_ECHO_N,
[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
])
Nary a `printf' in sight. The whole of configure then uses constructs
like:
echo $ac_n "message$ac_c"
to pretty print its
checking foo ... (cached) yes
messages. As soon as `ash' stops supporting `echo -n', all those
`configure' scripts will start looking plug ugly.
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
Reply to: