MikeLacey--
Initally, your example is how I was doing things, but the requirements changed where I needed individual files parsed, instead of one file containing the parsed data.
So no I am passing the data in a for loop:
for file in `ls -1 *.txt`
do
cat $i |perlscript.pl > ADD_$i-`date...
Greetings!
I have a new requirement for a small shell scrip that I want to convert over to perl as follows:
1)unzip files in the format 'file-`date +%Y%m%d`.zip' into Spool DIR
2)parse each file with a perl script and append prefix ADD on them
e.g ADD_file-`date +%Y%m%d`.zip
3) package...
Now, that the script has revolved, in terms of check if a file exist in the following format 'FILE-`date +%Y%m%d`.zip' and runs 5 minutes after mid-night, I need a way of check if the file exist before pulling a new file.
I have tried:
if [[ -f /home/user/FILE-`date +%Y%m%d`.zip ]];
then...
Annihilannic--
Thanks for the follow-up, but when I run the command from the shell script, for some reason the zip is being omitted, as for the same zip file, I can change this later, I am just try to get the command to run successfully at this point.
However, I do have another issue as follows:
I am wanting to run remote commands with this same script as follows, but the results are not the same as running in the shell.
ssh remote-server 'find /usr/sap/reporting -mtime +0 -name "*.txt" -exec zip /var/tmp/file {} \;'
For some reason -exec...
Greetings!
I have revised a simple script for connecting to a remote server and zipping files and then pulling them to a local server, I now need help implement some logic to send notification if files on the remove machine aren't present.
***INFO***
ERROR when there are no files:
Archiving...
KevenADC--
I have 2 issues here: the document is protected as to why I need to enter LDAP account info when prompted, Secondly I need to specify the proxy for getting out to site.
I have made changes to my script to accommodate these requirements but still is not working as expected...
Please observer the script below that monitors my remote Apaches. I am having a problem modifying the script for two new authentication mechanism that were put in place.
1) I need to script to specify a proxy server (no userid or passwd required).
2) When prompt for authentication dialog box...
This is great, except for I am wanting to REMOVE any line in the access log which contains a '-' in the 3rd position completely from the access.log.
so if I have multiple entries like this:
192.168.15.101 - - [02/Jul/2008:10:28:26 -0500] "GET
192.168.15.101 - - [02/Jul/2008:10:28:26 -0500]...
Yes. In fact place these variable before the log file entry and did a graceful restart on the server.
Entries:
SetEnvIf Remote_User "-" dontlog
SetEnvIf Remote_User "^-" dontlog
SetEnvIf Remote_User "^-.*$" dontlog
CustomLog "|/usr/sbin/cronolog /var/log/httpd/access-log.%Y.%m.%d.log" combined...
Greetings:
Can someone help me with a little script that will strip LINES from my access logs that have a hyphen '-' in the 3rd position?
Example data:
192.168.15.101 - - [02/Jul/2008:10:28:26 -0500] "GET
In this case, I want to remove all LINES in my access log that has '-' in the 3rd...
I tried something like, 'perl -pi -e 's/-//g' access.log, but the line contain the '-' hyphen is not being removed. So what I am wanting, is every LINE that has '-' in the 3rd position to get moved.
-Thanks
I am having trouble with mod_setenvif removing entries from my access logs, where remote_user is has an hyphen '-'.
The idea is to filter out any requests that has '-' where remote_user is stored.
Not working:
SetEnvIf Remote_User "-" dontlog
example of log entry:
192.168.15.101 - -...
Greetings,
I am wanting to parse my Apache access logs for and empty string that appears in the same position and remove them from my access logs as they are just noise.
example:
192.168.15.101 - - [02/Jul/2008:10:28:26 -0500] "GET
In short I am wanting to remove all hyphen in the 3rd position...
Can someone give me some directions for recursively recovering files and directories within Networker? Our admins familiar with doing this from the GUI and I know there has to be a way.
He selects the directories from the GUI for being restored but, not all files and sub-directories are being...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.