From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- source3/script/strip_trail_ws.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 source3/script/strip_trail_ws.pl (limited to 'source3/script/strip_trail_ws.pl') diff --git a/source3/script/strip_trail_ws.pl b/source3/script/strip_trail_ws.pl new file mode 100755 index 0000000..c2c39e2 --- /dev/null +++ b/source3/script/strip_trail_ws.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w + +open( INFILE, "$ARGV[0]" ) || die $@; +open( OUTFILE, ">$ARGV[0].new" ) || die $@; + +while ( ) { + $_ =~ s/[ \t\r]*$//; + print OUTFILE "$_"; +} + +close( INFILE ); +close( OUTFILE ); + +rename( "$ARGV[0].new", "$ARGV[0]" ) || die @_; + +exit( 0 ); + + -- cgit v1.2.3