全部博文(108)
分类: PERL
2014-05-04 10:19:54
perl -lpe 's/\s*$//'
2.ls -l | perl -lane 'print "$F[7] $F[1]"'3perl -F: -lane 'print $F[0]' /etc/passwd4.perl -lape 's/Installing\K.*/ Test/'5.perl -F: -lane 'print $F[0] if $F[4] =~ /'"'"'/' /etc/passwd6env re="'" perl -F: -lane 'print $F[0] if $F[4] =~ /$ENV{re}/' /etc/passwd7perl -F, -lane '$t += $F[1]; END { print $t }'8ip address list eth0 | \ perl -MRegexp::Common -lne 'print $1 if /($RE{net}{IPv4})/'