回答編集履歴

1

Update

2021/12/06 17:57

投稿

melian
melian

スコア20655

test CHANGED
@@ -8,13 +8,15 @@
8
8
 
9
9
 
10
10
 
11
- LINE=$(grep -n "cccccc" test.txt | cut -d: -f1)
11
+ #LINE=$(grep -n "cccccc" test.txt | cut -d: -f1)
12
12
 
13
13
 
14
14
 
15
+ match='cccccc'
16
+
15
17
  ed test.txt <<EOS >/dev/null 2>&1
16
18
 
17
- ${LINE}d
19
+ /${match}/d
18
20
 
19
21
  wq
20
22