Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Search
wiki:
awk
Context Navigation
Start Page
Index
History
Last modified
7 years
ago
特定の行にマッチしたn行前を表示
$ awk '{a[NR]=$0}$0~/read/{printf("%s\n",a[NR-5])}' test.txt
Download in other formats:
Plain Text