回答編集履歴
1
改善
test
CHANGED
@@ -22,9 +22,7 @@
|
|
22
22
|
|
23
23
|
grep -C1 -n "$PTN" "$FILE" |
|
24
24
|
|
25
|
-
grep -o '^[0-9][0-9]*[-:]' |
|
26
|
-
|
27
|
-
sed 's/.$/d/'
|
25
|
+
sed -n 's/^([0-9][0-9]*)[-:].*$/\1d/p'
|
28
26
|
|
29
27
|
) "$FILE"
|
30
28
|
|