my $hostname = shift @ARGV || die "usage: $0 hostname command[ command ...]\n";
my @commands = @ARGV;
+
if ( ! @commands && ! -t STDIN && -p STDIN ) { # we are being piped into
while(<>) {
push @commands, $_;
print $out;
}
-
-
-
-
+if ( ! @commands ) {
+ system "cp -v /srv/ftp/upload/$hostname.rsc mikrotik/";
+}