![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variable values to awk command | jerardfjay | Shell Programming and Scripting | 1 | 05-22-2008 12:48 PM |
| passing values from sql to shell script | sachin.gangadha | Shell Programming and Scripting | 3 | 04-22-2008 08:11 PM |
| Passing Values from a shell script | dhananjaysk | Shell Programming and Scripting | 6 | 04-06-2006 06:33 AM |
| Passing values from SQR to UNIX | seeuinoz | UNIX for Advanced & Expert Users | 2 | 08-24-2005 12:54 PM |
| Passing values out awk. | gio123bg | Shell Programming and Scripting | 3 | 12-09-2003 10:32 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
passing values into logrotate??
Wondering if this is possible?
OK, here is my question. I'm backing up a TON of different logs in different locations. I'm querying a database for the information. What I'd like to do, is pass that information into a logrotate script for the backup.. i.e. I'm trying to do the following: logrotate -v /usr/local/bin/logrotate-config DIR1 HOST REFNUM (these last three would in theory be fed by a perl script) Where logrotate-config is: /logs/backups/$1/$2{ nomissingok compress nomail notifempty olddir /logs/archive/$2-archive postrotate /bin/kill -HUP `cat /var/run/syslog-ng.pid 2>/dev/null` 2> /dev/null || true mv /logs/backups/$1/$2 /logs/archives/$1.$3.`date +%Y%m%d`.$2 endscript } Is something like this possible? It doesn't work so far... Thanks! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Kinda ugly, but...
|
|||
| Google The UNIX and Linux Forums |