File: shadow-clean.pl

package info (click to toggle)
fsvs 1.2.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,452 kB
  • sloc: ansic: 16,683; sh: 5,914; perl: 757; makefile: 320; python: 90
file content (11 lines) | stat: -rwxr-xr-x 205 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl

# Replaces the password in shadow-like files
# Keeps single-character values (for deactivated etc.)

while (<>)
{
	@f=split(/(:)/);
	$f[2]='-' if length($f[2]) > 1;
	print join("", @f);
}