Skip to content

Instantly share code, notes, and snippets.

@masukomi
Created July 29, 2016 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masukomi/52ac2aaf09949a3f5fd9a02bc01251ee to your computer and use it in GitHub Desktop.
Save masukomi/52ac2aaf09949a3f5fd9a02bc01251ee to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in `cal | awk '{print $5}'`; do
if [ "x" != "x"$i ]; then
target_day=$i
fi
done
today=`date | awk '{print $3}'`
if [ $target_day = $today ]; then
# run some script
else
echo "No send content orders action performed, Not last Thursday of the month yet!"
fi
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment