~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to source3/script/strip_trail_ws.pl

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w
 
2
 
 
3
open( INFILE, "$ARGV[0]" ) || die $@;
 
4
open( OUTFILE, ">$ARGV[0].new" ) || die $@;
 
5
 
 
6
while ( <INFILE> ) { 
 
7
        $_ =~ s/[ \t\r]*$//; 
 
8
        print OUTFILE "$_"; 
 
9
}
 
10
 
 
11
close( INFILE );
 
12
close( OUTFILE );
 
13
 
 
14
rename( "$ARGV[0].new", "$ARGV[0]" ) || die @_;
 
15
 
 
16
exit( 0 );
 
17
 
 
18