I have created a simple script for find the error message from logs and added it on cron job file to get it by mail every 4hrs once.
That log file has time stamp, daily we will new logs. Now i am daily altering the date manually, so i need some assistance to fix it to change dates automatically.
This is the exact script
I changed it as [/code]
grep -i error /var/bv1to1_var/logs/bv03.bectondickinson.com/bvlog.out.`date +\%Y\%m\%d` | tee error_bv03.doc
[/code]
Is it right, will it work !!!
---------- Post updated at 07:37 AM ---------- Previous update was at 07:35 AM ----------
Hi,
I have created a simple script for find the error message from logs and added it on cron job file to get it by mail every 4hrs once.
That log file has time stamp, daily we will new logs. Now i am daily altering the date manually, so i need some assistance to fix it to change dates automatically.
This is the exact script
I changed it as
Is it right, will it work !!!
Moderator's Comments:
Please use code tags next time for your code and data. Thanks
Last edited by vbe; 09-05-2014 at 09:41 AM..
Reason: code tags please!!!
current date command runs well
awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
subtract 30 days fails
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Hi everybody!
I need to perform a task with a script but I have no idea how to do it, I hope someone could help me:
- on my linux pc I have many folders with movies, tv shows, toons, ecc.
They are shared by a dlna server to my panasonic tv where I can browse and see them.
The problem is that... (6 Replies)
I have a file that contains todays date(for ex- test_08/30/2013)
Now I want a script which will run and change the name of the file and put yesterday's date
(for ex- test_08/29/2013)
Please help.
---------- Post updated at 04:40 AM ---------- Previous update was at 04:31 AM ----------
I... (2 Replies)
Hi ,
I have file FSN.log which contains number 100. i have other Perl script when i run it , it ll increment this FSN.log value.
now my requirement is
when the count in FSN.log becomes 999, it should make the value to 100 again and Perl script to change the date or it should make the date... (2 Replies)
hi,
I have a code to connect to a remote Linux server through windows using SSH, with host-name, username and password built in the code.
I want to add a shell script in the code which should execute automatically without any user intervention.
(as u know that date change requires you/us to be... (0 Replies)
Someone can help me write a script for change date fromat
from "Feb 4 18:44:03 2009" to 2009020418 ?
from "Mar 17 16:44:03 2009" to 2009031716 ? (4 Replies)
I want to write a script which will automatically take password
sequentially from a file after every 10 days.
i.e the passwd command should be executed automatically every 10 days and it should take the input from the password file sequentially.
Has any1 got a solution?????????????? (1 Reply)
I would like to create a script that logs into a list of several servers 50+ and changes my password all at once.
Every 60 days we are required to login to each system and change our passwords or else they expire and our login account is deleted.
I have an idea on how I could do this but... (4 Replies)