Help for this page

Select Code to Download


  1. or download this
    #!/bin/sh
    perl -lne 'print+(split(/:/))[0]' /etc/passwd
    
  2. or download this
    #!/usr/bin/perl -ln
    BEGIN{ @ARGV = "/etc/passwd"; }
    print+(split(/:/))[0]
    
  3. or download this
    #!/usr/bin/perl -w
    @ARGV = "/etc/passwd";
    ...
    while(<>) {
    print+(split(/:/))[0];
    }