This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#対象の曜日を指定。0が日曜日。 | |
targetDay=2 | |
#曜日取得 | |
day=`date +%w` | |
#対象の曜日までの日数 | |
numOfdays=`expr $targetDay - $day` | |
#対象の日付を取得 | |
date=`date -d "$numOfdays days" +"%Y-%m-%d"` |
NewerOlder