hcclnoodles
IS-IT--Management
Hi there I currently use a line in a script
ndate=$(date +"%d/%m/%Y")
This obviously returns the date in a format i have chosen. However, I need to come up with a solution for weekends and as such need a way of returning todays date minus two days in the same format (24/11/2004)
so for example if today was monday and the command ndate=$(date +"%d/%m/%Y") returned 17/01/2005, I would want to redo that command so that it would return 15/01/2005 (saturdays date)
any ideas
ndate=$(date +"%d/%m/%Y")
This obviously returns the date in a format i have chosen. However, I need to come up with a solution for weekends and as such need a way of returning todays date minus two days in the same format (24/11/2004)
so for example if today was monday and the command ndate=$(date +"%d/%m/%Y") returned 17/01/2005, I would want to redo that command so that it would return 15/01/2005 (saturdays date)
any ideas