#!/bin/bash # reportticker in time / overtime # pom 21-8-57 # wiboon 30-10-62 # ip1=$(ip -4 address show dev eth0 | grep inet | awk '{ print $2 }' | cut -f1 -d/) unit=COMLAB ipx=$(echo $ip1 | cut -d\. -f1,2) dash1=$(perl -e "printf '-' x 140") date2=$(date +%d) date3=$(date +%m+%Y) date7=$(date +%B+%Y) year1=$(date +%Y) month1=$(date +%m) time1=163000 date3=$(date --date=$year1$month1$date2 +%m-%Y) date7=$(date --date=$year1$month1$date2 +%B-%Y) dir1=/var/www/test/report-intime-overtime if [ ! -d $dir1 ] ; then mkdir -p $dir1 fi dir2=$dir1/intime if [ ! -d $dir2 ] ; then mkdir -p $dir2 fi dir3=$dir1/overtime if [ ! -d $dir3 ] ; then mkdir -p $dir3 fi file1=$dir1/$date3.html cat /dev/null > $file1 echo "
| | |