libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

zsh and echo tests


From: Peter O'Gorman
Subject: zsh and echo tests
Date: Sun, 16 Mar 2003 19:54:06 +0900

Well, in trying to find an echo test to discover zsh echo's removal of \ escapes, I came up with this:

if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
      eval echo_test_var=`$echo '\\\t'` &&
     test "X$echo_test_var" = "X\t" &&

Okay to include this with my next try at a darwin patch?
It would appear that zsh-4.0.4 (and earlier?) is almost totally unusable as a libtool shell.

I did some tests with various shells, here is the test:
$ for echo in "echo" "/bin/echo" "print -r" "printf %s\n"; do if eval echo_test_var=`$echo '\\\t'` && test "X$echo_test_var" = "X\t"; then echo $echo "YES"; else echo $echo "NO"; fi;done
=================================
zsh-4.0.4
echo NO
/bin/echo NO
print -r NO
printf %s\n NO
=================================
zsh-4.0.6
echo YES
/bin/echo YES
zsh: command not found: print -r
print -r NO
zsh: command not found: printf %s\n
printf %s\n NO
=================================
ash (don't know the version offhand)
echo YES
/bin/echo YES
print: not found
print -r NO
printf %s\n YES
=================================
bash 2.05b
echo YES
/bin/echo YES
bash: print: command not found
print -r NO
printf %s\n YES
=================================
ksh (from NetBSD cvs HEAD 2 weeks ago)
echo NO
/bin/echo YES
print -r YES
printf %s
 YES





reply via email to

[Prev in Thread] Current Thread [Next in Thread]