in reply to Script Automation

I'm not sure what you are asking for. Writing out a script from Perl is just like writing any other text file, except for things like execute access.
The code you give:
#!/bin/sh # df -k /var/log # end of script
will not work - unlike Perl, shells take a newline (or a ;) as a statement terminator - that line will be seen as one #! line:
#!/bin/sh # df -k /var/log # end of script
is just three lines of comments, so you should loose the second #.
Ever considered using Perl instead of the shell?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.