Sysadmin day is the last Friday of July.
Sysadmins tend not to stray too far from the terminal, where they belong.
Sysadmins grok man {,/usr}/bin/*.
Sysadmins sometimes stray into interpreted languages found in /usr/bin/*.
Sysadmin day is the last Friday of July.
Sysadmins tend not to stray too far from the terminal, where they belong.
Sysadmins grok man {,/usr}/bin/*.
Sysadmins sometimes stray into interpreted languages found in /usr/bin/*.
On
Not exactly a one-liner, and building off the other answers - this one will get the next sysadmin day rather than just the one for this year.
#!/bin/bash
sysadmin_date() {
year=$1
echo $year-07-$(cal -h 7 $year | cut -d' ' -f6 | grep . | tail -1)
}
next_sysadmin_date() {
this_years_sysadmin_date=$(sysadmin_date $(date +%Y))
next_years_sysadmin_date=$(sysadmin_date $(expr $(date +%Y) + 1))
today=$(date +%Y-%m-%d)
[[ $today > $this_years_sysadmin_date ]] && echo $next_years_sysadmin_date || echo $this_years_sysadmin_date
[[ $today == $this_years_sysadmin_date ]] && >&2 echo "Happy Sysadmin Day! "
}
next_sysadmin_date
This sysadmin came up with:
after @tuberous-potato's answer I came up with