From: Daniel A. S. <st...@ic...> - 2004-07-23 08:53:35
|
On Friday, Jul 23, 2004, at 17:02 Australia/Sydney, Daniel A. Steffen wrote: > BTW, the tcle script posted previously had a slight quoting bug, fixed > version below just noticed that this didn't properly handle arguments containing spaces... the following works better #!/bin/sh if [ "$1" == "-c" ]; then s="$2" && shift 2 && for a; do v="$v{$a} "; done && echo "set argv {$v}; eval {$s}" | tclsh else tclsh "$@" fi Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |