- or download this
$ cat passwd
root:x:0:0:ifeuu1 root:/root:/bin/bash
...
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
- or download this
#!/usr/bin/perl
# perl-grep4.pl
...
}
}
}
- or download this
$ Test5.pl '(?<!\broot:)x:0:' passwd
noncom:x:0:0:cause RegEx Fail:/noncom:/bin/bash
$&: x:0:
- or download this
PW:root:passwd:(?<!\broot:)x:0:
- or download this
#!/usr/bin/perl
#use strict;
...
print "\n";
}
print "\n";
- or download this
$ Test6.pl
...
$&:
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
$&: