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