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

Re: (feature request) Shell script within shell script



Dear Zsh expert,

When writing a shell script, quite often, I have to write bunch of
separate Awk/Python/Perl/etc scripts that are more than few lines.  I
tend to lose track of which script does what, and get bitten over two
levels of quotes.

Essentially, I wish I could do something like
    
    herefile test1 << "EOF"
    #! /usr/bin/gawk -f
    ...
    ...
    EOF

and

    herefile test2 << "EOF"
    #! /usr/bin/python
    ...
    ...
    EOF

so that invocation and usage of 'test1' and 'test2' will be the same as
if they were separate real files.

Can Zsh do this now?  If not, does Zsh have standard mechanism to
provide this kind of extensions?

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



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