[Top][All Lists]

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

emtpy functions are not properly parsed

From: Han Boetes
Subject: emtpy functions are not properly parsed
Date: Thu, 5 Aug 2004 16:57:08 +0200
User-agent: Mutt/1.5.6i


I found this bug in bash-3.0 but also in 2.05b, I tested it on FreeBSD,
OpenBSD and linux so I think this is not platform dependant: Suppose I
create a testscript like this:

~% > testje
something() {

~% chmod 755 testje
~% ./testje
./testje: line 3: syntax error near unexpected token `}'
./testje: line 3: `}'

This is practical to be able to source functions from a configfile, so
they are not undefined. This is userfriendlier than making multiple
separate files to source.

This works fine in both zsh and ksh but not in bash.

# Han
For all ya        |\      _,,,---,,_        COBOL: Completely Over and
untamed Daemons   /,`.-'`'    -.  ;-;;,_     Beyond reason Or Logic.
OpenBSD-current  |,4-  ) )-,_..;\ (  `'-'
on an i386      '---''(_/--'  `-'\_)

reply via email to

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