Help for this page

Select Code to Download


  1. or download this
    perl -MTie::File -ne 'BEGIN{tie(@f,"Tie::File",shift,mode=>0,autochomp
    +=>0) or die "tie failed $!"} print@f[$_..$_+2]'
    
  2. or download this
    $ echo 0 |perl -MTie::File -ne 'BEGIN{tie(@f,"Tie::File",shift,mode=>0
    +,autochomp=>0) or die "tie failed $!"} print@f[$_..$_+2]' /etc/passwd
    root:x:0:0:root:/root:/bin/bash
    bin:x:1:1:bin:/bin:/sbin/nologin
    daemon:x:2:2:daemon:/sbin:/sbin/nologin
    $