repo.or.cz
/
Samba.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
samba_kcc: Fix compile failures and correctly implement MS-ADTS 6.2.2.3.1 ISTG selection
[Samba.git]
/
source3
/
script
/
strip_trail_ws.pl
blob
c2c39e21e3cf09be1dc8839a156d5f9a99d5824a
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