forked from soarpenguin/perl-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbatch_send.pl
More file actions
43 lines (33 loc) · 702 Bytes
/
batch_send.pl
File metadata and controls
43 lines (33 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env perl
#
BEGIN {
use Cwd 'realpath';
our $curdir;
$curdir = __FILE__;
$curdir = realpath($curdir);
$curdir =~ s/[^\/]+$//;
### $curdir
if (-e "$curdir/lib") {
unshift @INC, "$curdir/lib/";
}
}
use strict;
use warnings;
my $script = &my_program();
&main(@ARGV);
sub main {
print &usage();
}
sub usage {
return <<EOT
Usage: $script [option]... -s src -d dst hostlist
-s : Source file for distribution.
-d : Destination dir or file for distribution.
-p : Set parallel for distribution.
-c : Run the command for hostlist.
EOT
}
sub my_program {
require File::Basename;
return File::Basename::basename( $0 );
}