質問編集履歴
2
各設定追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,6 +36,18 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
+
cronの設定
|
40
|
+
|
41
|
+
*/5 * * * * /home/sakura/cobol_test/test.sh
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
crontab -lの結果
|
46
|
+
|
47
|
+
*/5 * * * * /home/sakura/cobol_test/test.sh
|
48
|
+
|
49
|
+
|
50
|
+
|
39
51
|
var/log/cronの内容
|
40
52
|
|
41
53
|
Oct 25 10:30:01 tk2-260-39672 CROND[27118]: (sakura) CMD (/home/sakura/cobol_test/test.sh)
|
1
shellスクリプトの内容追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,6 +8,34 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
+
shellスクリプトの内容
|
12
|
+
|
13
|
+
```shell
|
14
|
+
|
15
|
+
#!/bin/bash
|
16
|
+
|
17
|
+
str1=$(date "+%Y%m%d%H%S")
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
str2=$(cat /dev/urandom | tr -dc "[:alpha:]" | fold -w 10 | head -n 1)
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
str3=$((RANDOM%+10000))
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
cat <<EOF >> test.text
|
30
|
+
|
31
|
+
$str1 $str2 $str3
|
32
|
+
|
33
|
+
EOF
|
34
|
+
|
35
|
+
```
|
36
|
+
|
37
|
+
|
38
|
+
|
11
39
|
var/log/cronの内容
|
12
40
|
|
13
41
|
Oct 25 10:30:01 tk2-260-39672 CROND[27118]: (sakura) CMD (/home/sakura/cobol_test/test.sh)
|