質問編集履歴
4
テストコード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
import subprocess
|
56
56
|
|
57
|
-
res = subprocess.run(["
|
57
|
+
res = subprocess.run(["xxx.sh", "test.csv"], stdout=subprocess.PIPE)
|
58
58
|
|
59
59
|
print(res)
|
60
60
|
|
3
調査内容の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,31 @@
|
|
39
39
|
Django2を使ったwebアプリ上で動作します。
|
40
40
|
|
41
41
|
/batch/output.shをコマンド実行すると正常に動作します。
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
### 追記
|
46
|
+
|
47
|
+
シェルの手動実行・・・ok
|
48
|
+
|
49
|
+
test.py の実行・・・ok
|
50
|
+
|
51
|
+
```test.py
|
52
|
+
|
53
|
+
#!/usr/bin/env python
|
54
|
+
|
55
|
+
import subprocess
|
56
|
+
|
57
|
+
res = subprocess.run(["/home/www/geppo_import/geppo.sh", "test.csv"], stdout=subprocess.PIPE)
|
58
|
+
|
59
|
+
print(res)
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
Webアプリ(Django)からの実行・・・NG
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
権限、PATH、Django仕様あたりを調べてみます。
|
2
webアプリケーションについて記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,6 +36,6 @@
|
|
36
36
|
|
37
37
|
### 補足情報
|
38
38
|
|
39
|
-
|
39
|
+
Django2を使ったwebアプリ上で動作します。
|
40
40
|
|
41
41
|
/batch/output.shをコマンド実行すると正常に動作します。
|
1
シェルの間違いを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
```output.sh
|
30
30
|
|
31
|
-
sed -
|
31
|
+
sed -e "s/\r//" /tmp/xxx.csv > /export/file.csv
|
32
32
|
|
33
33
|
```
|
34
34
|
|