Help for this page

Select Code to Download


  1. or download this
    perl -ne 'print @t if /foo/; push @t,$_; shift @t if $#t>5' file
    
  2. or download this
    perl -ne 'print @t if /foo/; @t=(@t[1..4],$_)' file