我使用 grep 查找包含我的搜索字符的行。除了那一行,我还想要前一行以及后一行。
For example
cat test.csv
bbbbbbbbbbbbb
xxx234.123yyy
abc123.456efg
zzz789.222xxx
aaaaaaaaaaaaa
grep '123.456' test.csv
I get a line say,
abc123.456efg
Addition to that I need like this
xxx234.123yyy
abc123.456efg
zzz789.222xxx