|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 895 (0x37f)
Types: TextFile
Names: »crlf.bat«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
└─⟦b5330643c⟧ »./cops/perl-4.019/perl.tar.Z«
└─⟦2b9a58213⟧
└─⟦this⟧ »perl-4.019/msdos/eg/crlf.bat«
@REM=("
@perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
@end ") if 0 ;
# Convert all the files in the current directory from unix to MS-DOS
# line ending conventions.
#
# By Diomidis Spinellis
#
open(FILES, 'find . -print |');
while ($file = <FILES>) {
$file =^ s/[\n\r]//;
if (-f $file) {
if (-B $file) {
print STDERR "Skipping binary file $file\n";
next;
}
($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime,
$blksize, $blocks) = stat($file);
open(IFILE, "$file");
open(OFILE, ">xl$$");
while (<IFILE>) {
print OFILE;
}
close(OFILE) || die "close xl$$: $!\n";
close(IFILE) || die "close $file: $!\n";
unlink($file) || die "unlink $file: $!\n";
rename("xl$$", $file) || die "rename(xl$$, $file): $!\n";
chmod($mode, $file) || die "chmod($mode, $file: $!\n";
utime($atime, $mtime, $file) || die "utime($atime, $mtime, $file): $!\n";
}
}