Timeline for Bash script to test if it's the first Monday of the month
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 20, 2018 at 16:58 | vote | accept | thebtm | ||
| Dec 20, 2018 at 16:59 | |||||
| May 24, 2018 at 21:10 | comment | added | thebtm | This Answer works too but the other one is easier to read for if/when others need to take over the script. Thank You for the info though. | |
| May 24, 2018 at 20:53 | comment | added | Hauke Laging | @thebtm No, -a is for [ ], not for [[ ]]. No need to call date twice. See my edit. | |
| May 24, 2018 at 20:52 | history | edited | Hauke Laging | CC BY-SA 4.0 | added 126 characters in body |
| May 24, 2018 at 20:48 | comment | added | thebtm | double condition where it checks for if its the day is within the first week and if the day is a monday if [[ $(date +%d) =~ 0[1-7] -a $(date +%u) == 1 ]]? | |
| May 24, 2018 at 20:45 | history | answered | Hauke Laging | CC BY-SA 4.0 |