Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (feature request) Shell script within shell script



On Sat, Feb 08, 2003 at 02:31:26AM +0000, Bart Schaefer wrote:
> Did you actually try that?  It certainly doesn't work for me.  You
> can't use two-or-more-digit numbers to represent FDs for redirection:

I use Bash.  I asked this group, because I wanted to know if a cleaner
solution is possible (or easily patchable) than the classic method of
    function test1 () {
	cat >/tmp/test1 <<"EOF"
	#! ...
	...
	EOF
	chmod +x /tmp/test1
	/tmp/test1 "$@"
    }

> However, I'd like to point out that this is not what you originally
> asked for.  You asked how to create a script, complete with #! line,
> and execute it, not how to feed a here-document to a command that
> expects a file name.

It's the best I could come up with.  It's okey for now, since most
external programs (ie. awk, python) can take script file.  But, my
search continues...

-- 
William Park, Open Geometry Consulting, <opengeometry@xxxxxxxx>
Linux solution for data management and processing. 



Messages sorted by: Reverse Date, Date, Thread, Author