我想从行CK
末的行开始grepping,而当行末的行停止grepping D
。我尝试过grep "$CK" "$D" file..txt
,但是没有用。
输入:
kkkkkkkkkkk
jjjjjjjjjjjjjjjjjj
gggggggggggg/CK
JHGHHHHHHHH
HJKHKKLKLLL
JNBHBHJKJJLKKL
JLKKKLLKJLKJ/D
GGGGGGGGGGGGGG
GGGGGGGGGGGGGG
所需的输出:
gggggggggggg/CK
JHGHHHHHHHH
HJKHKKLKLLL
JNBHBHJKJJLKKL
JLKKKLLKJLKJ/D
awk '/\/CK/,/\/D/' input