Re: commands within shell script
on Tue, 04 Mar 2003 09:20:27PM +0100, Martin Kacerovsky insinuated:
> On Tue, Mar 04, 2003 at 02:47:49PM -0500, Nori Heikkinen wrote:
> > by default, a shell script just appears as the script name in a
> > list of processes (ps; top), right? how can i make it show each
> > command called within the script as it's being executed?
>
> I don't think so, name of the script is not shown in ps, because
> script is only the input file a new shell you execute. And the
> commands it runns (e.g. who, ...) are properly displayed.
>
> Try it. put into file 'test.sh' line 'sleep 10' then chmod +x on
> it, and then execute it, in output you will see : the new shell, and
> sleep ...
okay, this is cool ... i'd just misunderstood a friend's question. he
doesn't even want to run top, he wants to stick in a bunch of echo
statements.
thanks!
</nori>
--
.~. nori @ sccs.swarthmore.edu
/V\ http://www.sccs.swarthmore.edu/~nori/jnl/
// \\ @ maenad.net
/( )\ www.maenad.net
^`~'^
Reply to: