bug-autoconf
[Top][All Lists]
Advanced

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

Solaris 10 /bin/sh, shell functions, here documents and command substitu


From: Stefano Lattarini
Subject: Solaris 10 /bin/sh, shell functions, here documents and command substitutions
Date: Fri, 23 Dec 2011 00:07:52 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16

Hello autoconfers.

While testing automake on Solaris 10, I've come across another "funny"
misbehaviour of /bin/sh: it trips up on here-documents that contains a
command substitution *and* are fed to a shell function:

  # All as expected.
  $ cat <<END
  `pwd`
  END
  /home/stefano
  $ echo status = $?
  status = 0

  # An apparently innocuous function ...
  $ kitty () { cat; }
  # ... but hilarity ensues!
  $ kitty <<END
  `pwd`
  END
  /tmp/sh137723: cannot open
  $ echo status = $?
  status = 1

Regards,
  Stefano



reply via email to

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