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

Interactive definition of a shell function.



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 (expecting "}")

So how can a shell function be defined interactively?

Thanks,              ... Peter E.


-- 
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +13606390202  Bcc: peasthope at shaw.ca  http://carnot.yi.org/  
"http://members.shaw.ca/peasthope/index.html#Itinerary "


Reply to: