Search Results

Search: Posts Made By: ghostdog74
11,770
Posted By ghostdog74
awk 'BEGIN{tail=50} { a[NR%tail]=$0 } ...
awk 'BEGIN{tail=50}
{
a[NR%tail]=$0
}
/pattern/{ for(i=NR+1;i<=NR+tail;i++)print a[i%tail]}
' file
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy