[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
scripting newbie has question...
- From: "Stone, Timothy" <tstone cityofhbg com>
- To: "Redhat-List (E-mail)" <redhat-list redhat com>
- Subject: scripting newbie has question...
- Date: Mon Dec 30 15:54:03 2002
Always lurking. Love this list and have learn ed a lot. ;)
I have simple script that works but I would like to make it a bit more robust and have no idea where to begin as I'm a newbie to shell scripting.
Here's the simplicity of it today:
# start ################################
#!/bin/sh
scp -i [key] [server0-log] [local0-log]
scp -i [key] [server1-log] [local1-log]
# end ##################################
This is run as a user cron job daily.
The script is going to work for at least another day. Then I will have to edit it and it will work for another month.
My server logs are named dynamically as so: %Y%M_server0.log
So the point of all this? How do I add %Y%M features to my script? I don't know C, but decent with Java, so the bridge is not to far to cross. I might be over thinking this and the feature is in the shell.
Thanks in advance for any help.
Warmest Regards,
Tim
--
/**
* Timothy Stone . Sun Certified Java Programmer
* Web Master . tstone at cityofhbg dot com
* City of Harrisburg . 717.255.7297
* Pennsylvania USA . 717.903.9162
*
* "Censorship always defeats its own purpose,
* for it creates in the end the kind of society
* that is incapable of exercising real discretion."
* --Henry Steele Commager, Historian
*/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]