OSDN Git Service
(root)
/
yamy
/
yamy.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
collect some files' permissions
[yamy/yamy.git]
/
tools
/
dos2unix
1
#!/usr/local/bin/perl -w
2
# -*- cperl -*-
3
4
binmode STDIN;
5
binmode STDOUT;
6
7
foreach $i ( @ARGV ) {
8
open (FILE, "<$i");
9
binmode FILE;
10
@lines = <FILE>;
11
close (FILE);
12
13
open (FILE, ">$i");
14
binmode FILE;
15
foreach $j ( @lines ) {
16
$j =~ s/\x0d\x0a/\x0a/g;
17
print FILE $j;
18
}
19
close (FILE);
20
}