Next message: chamster: "Re: [LUNI] apt-get and recommended packages"
luni's
i'm attempting to modify a shell script that starts
and stops the tomcat java servlet container on our
test box at work.
my startup script starts the server and creates a log
file - everything works fine. the shutdown script
shuts down fine, but i'd like to make it move the log
file to another directory and rename it with a
timestamp at the end. i've figured out how to move
the file; but how do i rename it?
i'm doing:
<shutdown script stuff...>
TIMESTAMP = `date '+%m/%d/%y_%H:%M:%S'`
mv /XXX/tomcat/logs/logfile
/XXX/tomcat/logs/RotatedLogs/logfile. + TIMESTAMP
this gives me a:
mv: when moving multiple files, last argument must be
a directory
Try `mv --help' for more information.
error. should i use cat instead of mv?
and how do i use environment variables within the
script? instead of typing out:
mv /XXX/tomcat/logs/logfile ...
i want to use $TOMCAT_HOME which is set up to point at
tomcats home dir: /XXX/tomcat
then i could type:
mv $TOMCAT_HOME/logs/logfile
if i do this now i get an error saying /logs/logfile
does not exist. TOMCAT_HOME is not being resolved.
any help would be appreciated.
thanks a bunch
andy
ps: where can i get some quick and dirty lessons on
shell scripting for bash online?
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
-=-
Linux Users Of Northern Illinois: General Discussion Mailing list.
For unsubscription, archives, and announcements only see http://luni.org
This archive was generated by hypermail 2b29
: Fri Mar 23 2001 - 10:35:40 CST