SHELL script の 実行

Fri Apr 26 08:56:03 JST 2024

day of week=Fri( 金 )
month=Apr
day=26
time=08:56:03
year=2024

20240426085603



date
set `date`
echo '<br>day of week='$1'('
if [ Fri = Mon ] ; then
echo '月'
elif [ $1 = Tue ] ; then
echo '火'
elif [ $1 = Wed ] ; then
echo '水'
elif [ $1 = Thu ] ; then
echo '木'
elif [ $1 = Fri ] ; then
echo '金'
elif [ $1 = Sat ] ; then
echo '土'
elif [ $1 = Sun ] ; then
echo '日'
fi
echo ')'
echo '<br>month='$2
echo '<br>day='$3
echo '<br>time='$4
echo '<br>year='$6
echo `date '+%Y%m%d%H%M%S'`