回答編集履歴
1
Update
answer
CHANGED
@@ -3,10 +3,11 @@
|
|
3
3
|
**ChangeFile.sh**
|
4
4
|
```bash
|
5
5
|
|
6
|
-
LINE=$(grep -n "cccccc" test.txt | cut -d: -f1)
|
6
|
+
#LINE=$(grep -n "cccccc" test.txt | cut -d: -f1)
|
7
7
|
|
8
|
+
match='cccccc'
|
8
9
|
ed test.txt <<EOS >/dev/null 2>&1
|
9
|
-
${
|
10
|
+
/${match}/d
|
10
11
|
wq
|
11
12
|
EOS
|
12
13
|
|