[clug] logging installation steps

Sam Couter sam at couter.dropbear.id.au
Mon Aug 15 13:17:09 GMT 2005


Nerdvana - Steve Walsh <S.walsh at nerdvana.com.au> wrote:
> Hello Cluggers
> 
> I have the need to monitor the running of a shell script to ensure
> successful installation. What I do now is;
> 
> #mkdir /home/whm
> #cd /home/whm
> #wget http://install.example.com/latest
> #sh latest

> Does anyone have ideas on the best way to log something like this for later
> inspection?

Not best, but easiest way may be to replace the last line with something
like:

sh -x latest > logfile 2> errfile

The -x tells the shell to echo each command before it's run. It's
usually used for debugging.
-- 
Sam "Eddie" Couter  |  mailto:sam at couter.dropbear.id.au
Debian Developer    |  mailto:eddie at debian.org
                    |  jabber:sam at teknohaus.dyndns.org
OpenPGP fingerprint:  A46B 9BB5 3148 7BEA 1F05  5BD5 8530 03AE DE89 C75C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20050815/43e5e652/attachment.bin


More information about the linux mailing list