Quote:
Originally Posted by tredegar
You need to create a new filename each time you want the log saved.
You can easily do this with date
date +%s gives the number of seconds since 1970-01-01 00:00:00 UTC
Sample code:
Code:
LOGFILE=logfile-$(date +%s)
./bash.sh > $LOGFILE
|
It works but the result is not what i want.
The logfile created and its contain :
Code:
Usage: ./domain-check [ -e email ] [ -x expir_days ] [ -q ] [ -a ] [ -h ]
{[ -d domain_namee ]} || { -f domainfile}
-a : Send a warning message through email
-d domain : Domain to analyze (interactive mode)
-e email address : Email address to send expiration notices
-f domain file : File with a list of domains
-h : Print this screen
-s whois server : Whois sever to query for information
-q : Don't print anything on the console
-x days : Domain expiration interval (eg. if domain_date < days)
But the output is something like this and I need to see this result into logfile :
Code:
roghan@Nabati:~$ ./domain-check -d yahoo.com
Domain Registrar Status Expires Days Left
----------------------------------- ----------------- -------- ----------- ---------
yahoo.com MARKMONITOR INC. Valid 19-jan-2012 192
Sorry.. I'm newbie in this case..