1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/source3/script/strip_trail_ws.pl
2007-10-10 12:23:34 -05:00

19 lines
271 B
Perl
Executable File

#!/usr/bin/perl -w
open( INFILE, "$ARGV[0]" ) || die $@;
open( OUTFILE, ">$ARGV[0].new" ) || die $@;
while ( <INFILE> ) {
$_ =~ s/[ \t\r]*$//;
print OUTFILE "$_";
}
close( INFILE );
close( OUTFILE );
rename( "$ARGV[0].new", "$ARGV[0]" ) || die @_;
exit( 0 );