Skip to content

Instantly share code, notes, and snippets.

@ring0li
Last active October 19, 2019 00:07
Show Gist options
  • Save ring0li/aab5441768f8ec91e74ee7690a394809 to your computer and use it in GitHub Desktop.
Save ring0li/aab5441768f8ec91e74ee7690a394809 to your computer and use it in GitHub Desktop.
[shell] shell #shell
```shell
#!/bin/bash
startDate="${1:-2018-08-20 00:00:00}"
endDate="${2:-$(date '+%Y-%m-%d %H:00:00')}"
cd /home/work/wwwroot/;
for (( i = 0; ; i++ ))
do
date="$(date -d "$startDate $i hour" '+%Y-%m-%d %H:00:00')"
if [ "$date" != "$endDate" ]; then
echo /home/work/lib/php7.1.4/bin/php crontab.php stat/stat_report cron_stat_report_flow "'$date'";
# /home/work/lib/php7.1.4/bin/php crontab.php stat/stat_report cron_stat_report_flow "$date";
else
echo 'Game Over'
exit 0
fi
sleep 1
done
```
@ring0li
Copy link
Author

ring0li commented Sep 4, 2018

#!/bin/bash

dbFile=$1
csvFile=$2

while read -r line
do
    echo sed -i "/$line/d" $csvFile
    sed -i "/$line/d" $csvFile
done < "$dbFile"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment