Re: function grammar

2010-07-19 Thread Ken Irving
On Mon, Jul 19, 2010 at 10:46:30AM +0200, Bernd Eggink wrote: > Am 19.07.2010 08:30, schrieb Ken Irving: > >On Sun, Jul 18, 2010 at 11:53:02AM -0700, Linda Walsh wrote: > >> > >>from man bash, to define a function use; > >> > >>"function" "name" > >> OR > >>"name" () > >> > >>right? > >> > >>And C

Re: How to input ^J?

2010-07-19 Thread Greg Wooledge
On Sun, Jul 18, 2010 at 05:01:05PM -0700, John Reiser wrote: > > Lastly since ^J is a newline you can generate one with echo "\n". > > What does work is either of these: > > $ echo '' > $ echo -e -n '\n' Or printf '\n'. Or if he wants to use it in a command string, rather than producing it on a

Re: function grammar

2010-07-19 Thread Andreas Schwab
Bernd Eggink writes: > "If the function reserved word is supplied, the parentheses are > optional." While the grammer has the right rules for this the handling inside of special_case_tokens isn't right up to it, it only recognizes '{' following 'function WORD'. Andreas. -- Andreas Schwab,

Re: function grammar

2010-07-19 Thread Bernd Eggink
Am 19.07.2010 08:30, schrieb Ken Irving: On Sun, Jul 18, 2010 at 11:53:02AM -0700, Linda Walsh wrote: from man bash, to define a function use; "function" "name" OR "name" () right? And Compound Commands are: () {; ) (( expression )) [[ expression ]] ...et al so why do I get