I creating a shell script but I want to attache the date to it...I know the symbols for the date...But my scipt won't attached the date to the file I'm creating...Example below
#!/bin/sh
logpath="/export/home"
datestring="date'%m/%d/%y:%H%M%S'"
pingfile="ping 1.1.1.1"
export pingfile datestring logpath
$pingfile > $logpath/test.$datestring
But the problem is I'm getting it won't create the date on the end....
I'm tring to get to look like this test.9/1/01:5:01:30
#!/bin/sh
logpath="/export/home"
datestring="date'%m/%d/%y:%H%M%S'"
pingfile="ping 1.1.1.1"
export pingfile datestring logpath
$pingfile > $logpath/test.$datestring
But the problem is I'm getting it won't create the date on the end....
I'm tring to get to look like this test.9/1/01:5:01:30