Hi,
I am currently updating a script, It should do the ff:
rename the YYYYMMDD in mainlog.YYYYMMDD to $NEW_DATE
I was ask to use sed but I am not that familiar with it.
I should update the touch part with the sed. Please kindly help me with this. Thanks a lot.
#----------------------------------------------------------------
# loop to touch the mainlog and archive_list files
#----------------------------------------------------------------
integer INDEX=1
OUT_DD="00"
while [ $INDEX -le $UPPER_LIMIT ]
do
OUT_DD=$INDEX
if [ $INDEX -lt 10 ]
then
NEW_DATE="$OUT_YYYY""$OUT_MM"0"$OUT_DD" # insert day with leading zero
else
NEW_DATE="$OUT_YYYY""$OUT_MM""$OUT_DD"
fi
touch -t ${NEW_DATE}"0000.01" ./logs/ctlm/mainlog.${NEW_DATE}.log