bug-gnulib
[Top][All Lists]
Advanced

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

Re: errno --> errno name ?


From: Bruce Korb
Subject: Re: errno --> errno name ?
Date: Fri, 05 Aug 2011 12:59:39 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

Hi Stefano,

On 08/05/11 06:48, Stefano Lattarini wrote:
zsh stumbles on this:

      egrep -h "$grep_expr" $errno_list | \
          sed "$sed_cmd" | \
          awk '{ print $1 " " $2 }' | \
          sort -u -n -k2>  ${tmpd}/sorted.txt

so it is not Bourne-enough to count.

It's not by default; you just have to tell it explicitly to behave more
bourne-like.

   # Be more Bourne compatible
   DUALCASE=1; export DUALCASE # for MKS sh
   if test -n "${ZSH_VERSION+set}"&&  (emulate sh)>/dev/null 2>&1; then :
     emulate sh
     NULLCMD=:
     # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
     # is contrary to our usage.  Disable this feature.
     alias -g '${1+"$@"}'='"$@"'
     setopt NO_GLOB_SUBST

Now that I've seen that, I think it is not Bourne-enough to count. :(

It tries to run awk with
the $errno_list argument instead of just passing output through to it.
Hopeless.

Huh?  What it the precise error message?

Basically, the expansion of $errno_list was as if it were quoted, "$errno_list".
It only looked like it was being passed through to awk because the 
multi-threaded
printing was much more intermingled than I normally see.

No way around it, zsh is just being gratuitously weird.  If folks want to run
Bourne shell scripts with it, then they need to jigger it themselves.

ash:
  >  $ ash -x ./mk-err-names.sh
  >  ./mk-err-names.sh: 37: Syntax error: word unexpected (expecting ")")

Which version of ash?  It works ok on my Debian box with dash 0.5.5.1 and
dash 0.5.2.

"dash" works fine.  I have no idea which version of ash I have.
It won't tell me with any of --version --help -v or -V options.
So the version is whatever openSuSE currently ships with 11.4.



reply via email to

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