Hi, all:
I am trying to figure out a way to accomplish the following:
1) Find all index.htm files in all subdirectories starting from the
/extra
2) Copy each index.htm file in its directory to an htm file with today's
day
abbreviated as the filename, (as in tue.htm today, wed.htm tomorrow...)
3) Make sure the date is all lowercase.
4) Run this script daily from a cron job.
I am new to shell scripting and awk. I figure I need to get the day by
doing:
date | nawk '{print $1}'
get the date into a variable,
do a find for all index.htm files under /extra
and then pipe a cp in each directory, as in:
#find /extra/ -name index.htm -print | cp index.htm tue.htm
I am having a hard time capturing the day from today's date in a
variable outside
awk to use in the rest of the script and making sure it's all lowercase.
Awk returns
Tue not tue.
Any help much appreciated. Please email me as well. I have gotten some
awk stuff to
work and it is a big timesaver for sure!
Gary
C*te NC