Re (2): Interactive definition of a shell function.

2013-09-12 Thread peasthope
From: Vincent Zweije Date: Thu, 12 Sep 2013 17:19:32 +0200 > The closing } is only recognized where a new command could have > started. Terminate your command with a semicolon. > > cpST () { cp Source Target; } Thanks, ... Peter E. -- 123456789 123456789 123456789 1234567

Interactive definition of a shell function.

2013-09-12 Thread peasthope
Suppose a user wants to make shell function such as this. cpST () { cp Source Target } The shell is waiting for a command so it can't be typed directly at the prompt. This also doesn't work. peter@dalton:~$ dash -c "cpST () { cp Source Target }" dash: 1: Syntax error: end of file unexpected

Re: Interactive definition of a shell function.

2013-09-12 Thread Vincent Zweije
On Thu, Sep 12, 2013 at 08:06:11AM -0700, peasth...@shaw.ca wrote: || Suppose a user wants to make shell function such as this. ||cpST () { cp Source Target } || The shell is waiting for a command so it can't be typed || directly at the prompt. Yes, it can. || This also doesn't work.