SH Command

Currently, at work there is a script that has the following command :

EH_COMMAND='
sh sntl_maint.sh ${__ENGINE} 1>&2

now, the issue is with the sh before sntl_maint.sh. The question is how does this work with placing the call (sntl_maint.sh) in the "background" so to say. Most of the programmers at work use the & to background a script when it is called from another script and using SH has started a debate along with some confusion.
What I am looking for is a clear definition of what the SH does in this instance.

Thanks.

It just specifies that the following file (sntl_maint.sh) should be processed using the 'sh' shell.
It has nothing to do with placing the command in the background. The '1>&2' that you mention is specifying that the STDOUT (output stream 1) should be redirected to the wherever STDERR (output stream 2) is going (usually your screen).

You would do something like:

sh sntl_maint.sh ${__ENGINE} 1>&2 &

to put it in the background

One other difference is that "sh myscript.sh" does not
require myscript.sh to be executable (i.e. it can have
file permissions 644 rather than 755). This book might help.

<CENTER>
<B>Unix Shell Programming (Hayden Books Unix System Library) <BR>
by Stephen G. Kochan, Patrick H. Wood (Contributor)
</B>

<A HREF="http://www.amazon.com/exec/obidos/ASIN/067248448X/silkroadcom"><IMG SRC="http://images.amazon.com/images/P/067248448X.01.MZZZZZZZ.jpg" border=0></a>
</CENTER>

<P>
This was Neo's first text for UNIX shell scripts. This is a great book and highly recommended. If you click on the photo, it will take you to Amazon.com for more details.

[Edited by Neo on 11-03-2000 at 09:32 PM]