Skip to content

Commit dae08ec

Browse files
author
lutaoact
committed
watchAndRestart
1 parent 2cb81fa commit dae08ec

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

pufa-myself.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#!/bin/bash
2-
awk '{print substr($3, 4)}' /data/backup/myself$(date +%m).txt | sed 's/,//g' | awk '{sum += $1 * 100}END{printf "%d %d.%02d\n", sum, int(sum / 100), sum % 100}'
2+
awk '{print substr($3, 4)}' /data/backup/pufa$(date +%Y%m).txt | sed 's/,//g' | awk '{sum += $1 * 100}END{printf "%d %d.%02d\n", sum, int(sum / 100), sum % 100}'
33

44
# 201710 8939.53
55
# 201710 613766 6137.66
66
# 201801 372970 3729.70
77
# 201802 227748 2277.48 zhao 760 zhong 1450 总计4500
8+
# 201802 358149 3581.49
9+
# 201808 155771 1557.71
10+
# 201809 254311 2543.11
11+
# 201810 274643 2746.43
12+
# 201811 52481 524.81
13+
# 201812 313567 3135.67
14+
# 201901 42371 423.71
15+
# 201902 50833 508.33

test.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ function test1() {
1717
test2 "$1"
1818
}
1919

20-
test1 ""
20+
a=100
21+
b=110
22+
23+
if [ "$(($a * $b))" -lt 10000 ]; then
24+
echo 0
25+
else
26+
echo not 0
27+
fi
2128

2229
#function how_to_return() {
2330
# return 0;

watchAndRestart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/bin/bash -xv
22

33
DIR=""
4-
echo $DIR
54

65
if [ "$1" == "hub" ]; then
76
DIR=~/qiniu/stark
87
elif [ "$1" == "account" ]; then
98
DIR=~/qiniu/keystone
9+
elif [ "$1" == "authgate" ]; then
10+
DIR=~/qiniu/ke
11+
elif [ "$1" == "qce" ]; then
12+
DIR=~/qiniu/qce
1013
else
1114
exit 1
1215
fi
1316

1417
cd $DIR
1518

16-
fswatch --exclude 'make' --exclude '\.git' --exclude 'account/store/ddl' -or ./ | xargs -n1 ~/bin/findThenKill $1 &
19+
fswatch --exclude 'models' --exclude 'docs' --exclude 'client' --exclude 'make' --exclude '\.git' --exclude 'account/store/ddl' -or ./ | xargs -n1 ~/bin/findThenKill $1 &
1720

1821
while true
1922
do

xs342.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/expect -f
22

3-
log_file -noappend "/data/log/go342.log"
3+
log_file -noappend "/data/log/xs342.log"
44

55
set timeout 30
66

0 commit comments

Comments
 (0)