#!/usr/bin/perl
-# $Header: findcp,v 2.0 88/06/05 00:16:47 root Exp $
+# $RCSfile: findcp,v $$Revision: 4.1 $$Date: 92/08/07 17:20:12 $
# This is a wrapper around the find command that pretends find has a switch
# of the form -cp host:destination. It presumes your find implements -ls.
$sourcedir = $ARGV[0];
if ($sourcedir =~ /^\//) {
$ARGV[0] = '.';
- unless (chdir($sourcedir)) { die "Can't find directory: $sourcedir"; }
+ unless (chdir($sourcedir)) { die "Can't find directory $sourcedir: $!"; }
}
$args = join(' ',@ARGV);
die("No destination specified");
}
-open(find,"find $args |") || die "Can't run find for you.";
+open(find,"find $args |") || die "Can't run find for you: $!";
while (<find>) {
@x = split(' ');