Hi
In my directory i have file of many days , i want to count the number of line of all the files of todays date. every file will have date component on it for eg.
#!/usr/bin/perl
@HOSTS = ("192.168.14.112", "192.168.14.90", "192.168.160.1", "192.168.160.100");
my $COUNT = 4;
my $date =`date`;
for my $myHost (@HOSTS) {
**$count = `ping -c $COUNT $myHost | grep 'received' |awk -F',' '{ print $2 }' |awk '{ print $1 }'`;**
if ( $count == 0 ){
print "Host : $myHost is down (pint failed) at $date \n";
}
Hi, I'm very new to this, so bear with me please.
I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then printing the date again in 1.out.
So basically something along the lines of:
example.sh
date
i have a log file that has the date and time that looks like this:
Code:
Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic
what we want to focus on is the first 5 columns because they contain the date and time.
the date and time can be anywhere on the line. in this particular case, the date and time is at the beginning of the line.
Hi, I'm very new to this, so bear with me please.
I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then printing the date again in 1.out.
So basically something along the lines of:
example.sh
date
./progr
hi guys im trying to write a bash script that grabs expired domain names it leaves me with the following outpiut in a text file
Quote:
1, test.com Expiration Date:17-jun-2013
2, test.net Expiration Date:29-mar-2013
3, test.org Expiration Date:26-Jul-2012 04:00:00
4, .test.biz Expiration Date:Mar 26 23:59:59 2012
5, test.info Expiration Date:27-Jul-2012 07:56:43
subject - print file date on solaris as format: yymmdd ( yy - year , mm - month , dd - day )
on Linux machine I type the following command in order to get: file date
as the following:
ls -l --time-style=+%Y%m%d /etc/hosts | awk '{print $6}'
20121107
.
please advice what the syntax for Solaris ?
I have 2 files that need to be compared. Email the differences if something is different and don't email if nothing is different. One or both of the files could be empty. One or both could have data in them.
example files
backup.doc.$(date +%y%m%d) file size is 0
backup.doc.$(TZ=CST+24 date +%y%m%d) file size is 412
or vice versa
Any help would be appreciated.
Can I print the date of a specific date?
Let say, today is 20 and I want to print in date format the day 14
I know that I can do this:
date --date='last Mon'
but
How can I do this?:
date --date='last 14'
??