How to get the day of week with bash/sh
How to get the day of week with bash/sh
- Localized day of week :
#!/bin/sh
DOW=$(date +"%a")
echo $DOW
- In english :
#!/bin/sh
LANG=C DOW=$(date +"%a")
echo $DOW
If you want to get current month, year, … replace %a by anything found here