autoconf
[Top][All Lists]
Advanced

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

Shell function revisited


From: Jeff Fulmer
Subject: Shell function revisited
Date: Thu, 22 Jan 2004 09:20:05 -0500
User-agent: Mutt/1.3.22.1i

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 \
  '
    s/\/*$//
    /\//!s/^/.\//
    h
    s/.*\///
    /[a-z]/! d
    y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
    x
    G
    s/^\(.*\)\n\(.*\)$/\2/p
  '
}
]) 

If somebody has an alternative way to do this, I'd love to know about
it. But I'd still like to know why this fails. $1 has a value but the
function echos nothing.


-- 
#include <stdio.h>
int main(){int a[]={74,117,115,116,32,97,110,111,116,104,101,114,32,67,\
32,104,97,99,107,101,114,10};int *b=a;for(;*b>0;printf("%c",*(b++)));}




reply via email to

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