Skip to content

Instantly share code, notes, and snippets.

@kasuganosora
Created April 10, 2015 15:30
Show Gist options
  • Select an option

  • Save kasuganosora/260d1172adea81a0cec4 to your computer and use it in GitHub Desktop.

Select an option

Save kasuganosora/260d1172adea81a0cec4 to your computer and use it in GitHub Desktop.
判断今天是不是一周的第一个星期6 不是的话则不继续执行
# 一周的第一个星期 6
if [ $(date +%d) -gt 7 ] || [ $(date +%w) -neq 6 ]
then
echo 'shit!'
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment