I have written an install script in shell that does some configuration of various things such as xserver, network, etc and then installs a few RPM's which is no problem. But I want to be able to log everything that goes to the terminal screen as well. Is this possible to do from within the script so if the end user runs ./Install.sh it will do everything (including the logging).
I have tried using "script" but doesn't work from within the Install.sh script itself.
Thanks
Just use:
when the install.sh finished the run, the
script
end too - so, you get everything logged intologfilename
.Probably you can make it two-stage, so, you should rename your current
install.sh
intoinstall-stage2.sh
and your install.sh will contain:UPDATE from my
man script