I need bash script for next business day after 15th of the current month. It should only give me next business day after 15th. I'm totally new to Bash Script. Thanks a lot.
d=1
while (($(date -d "$d days" +%u) >= 6)); do ((++d)); done
date -d "$d days" +%m/%d/%Y
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Quick and dirty using cal: First case is Friday, then Saturday, then Sunday.
( cal | grep -q "15 16$" && echo 18 ) || ( cal | grep -q "15$" && echo 17 ) || ( echo 16 )