Hi
I write a script to create file with name of previous date, but get stuck on how to get the previous date:
#!/bin/sh
date +%d > TODAY
TODAY -=TODAY #this is I want to make previous day
touch myserver>mydir/myfile.TODAY1200
--------
you can see line 2, I just want to get the date only to be stored in TODAY file, then I get stuck on the next line.
Is there any command to get the previous date or could someone figures out my terrible script please.
Thanks.
I write a script to create file with name of previous date, but get stuck on how to get the previous date:
#!/bin/sh
date +%d > TODAY
TODAY -=TODAY #this is I want to make previous day
touch myserver>mydir/myfile.TODAY1200
--------
you can see line 2, I just want to get the date only to be stored in TODAY file, then I get stuck on the next line.
Is there any command to get the previous date or could someone figures out my terrible script please.
Thanks.