SuperX-Kernmodul
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
587 B

# Autor: Edmund Wehling, Uni Köln
# Entfernen von Delimiter ^ am Ende jeder Zeile
# So unterbleiben die Notice-Meldungen.beim postgres-copy
# Aufruf über delEndChar.sh Dateiname <Zieldatei>
print "Ersetze ".$ARGV[0]." nach ".$ARGV[1]." ...\n";
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($ARGV[0]);
open(UNL, "<$ARGV[0]");
open(NEWUNL, ">newfile.tmp");
while (<UNL>) {
$_ =~ s/(.*)\^$/$1/;
printf NEWUNL $_;
}
close NEWUNL;
rename("newfile.tmp", $ARGV[1]);
chmod $mode, $ARGV[1];
printf "Fertig !!\n";