回答編集履歴
1
1
test
CHANGED
@@ -21,3 +21,33 @@
|
|
21
21
|
```
|
22
22
|
|
23
23
|
で、いけるんじゃ?
|
24
|
+
|
25
|
+
--- 追記 ---
|
26
|
+
|
27
|
+
ちなみに、やりたかったのはこういうことかな
|
28
|
+
|
29
|
+
```bash
|
30
|
+
|
31
|
+
while read line
|
32
|
+
|
33
|
+
do
|
34
|
+
|
35
|
+
echo $line | grep -e 'a1' >/dev/null
|
36
|
+
|
37
|
+
if [ $? -eq 0 ]
|
38
|
+
|
39
|
+
then
|
40
|
+
|
41
|
+
p=6
|
42
|
+
|
43
|
+
else
|
44
|
+
|
45
|
+
p=5
|
46
|
+
|
47
|
+
fi
|
48
|
+
|
49
|
+
echo $line | cut -f $p -d "/" >>result.txt
|
50
|
+
|
51
|
+
done <filea
|
52
|
+
|
53
|
+
```
|