home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Caldera Network Desktop 1.0
/
caldera-network-desktop-1.0.bin
/
images
/
rescue.img
/
bin
/
cat
next >
Wrap
Text File
|
1995-09-03
|
445b
|
26 lines
#!/usr/bin/perl
$rc = 0;
if ($0 =~ /cat$/) {
while (<>) { print };
} elsif ($0 =~ /rm$/) {
if ($ARGV[0] eq '-f') {
$force = 1;
shift(@ARGV);
} elsif ((substr($ARGV[0], 0, 1)) eq '-') {
print STDERR "Only -f is supported\n";
exit(1);
}
foreach $file (@ARGV) {
if ($force) {
unlink($file);
} else {
unlink($file) || print STDERR "couldn't remove $file\n";
$rc = 1;
}
}
}
exit($rc);