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