autoconf
[Top][All Lists]
Advanced

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

Re: Shell function revisited


From: Eric Sunshine
Subject: Re: Shell function revisited
Date: Thu, 22 Jan 2004 16:03:14 -0500

On Thu, 22 Jan 2004 09:20:05 -0500, Jeff Fulmer wrote:
> This function works perfectly well in a shell script, but it returns
> nothing when I employ it from acinclude.m4:
> AC_DEFUN([TOUPPER],[
> {
> echo $1 | sed -n '
> ...
> /[a-z]/! d
> ...
> '])

You forgot to properly quote the [a-z] range.  m4 strips away the [ and ]  
and leaves only 'a-z', which is not what you intended.  You need to use  
[[a-z]].  Also, the space before the 'd' in '! d' is non-portable.  That will  
cause an error in some sed programs.  You should eliminate the space and use  
'!d'.

-- ES




reply via email to

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