Changeset 428
- Timestamp:
- Nov 25, 2019, 1:52:13 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tssh/tssh
r427 r428 6 6 7 7 # Clean when Ctrl^C 8 trap '[ -n "${base_path}" -a -d "/tmp/${base_path}" ] && rm -rf "/tmp/${base_path}"; exit 4;' QUIT INT TERM8 trap '[ -n "${base_path}" -a -d "/tmp/${base_path}" ] && rm -rf "/tmp/${base_path}"; exit 2;' QUIT INT TERM 9 9 10 10 export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin 11 11 export LANG=C 12 12 13 VERSION='0. 2.4'13 VERSION='0.3.1' 14 14 15 15 function usage() { … … 17 17 tssh - tmux cluster ssh 18 18 19 tssh [-w number] [-f] [-v] [-h] [-p] [- c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+19 tssh [-w number] [-f] [-v] [-h] [-p] [-d delay_time] [-c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+ 20 20 21 21 -w windows windows to open (integer, default 16) … … 23 23 -f fast, no nmap scan to eliminate sleeping computer 24 24 -v verbose 25 -d delay_time delay between parallel connexion to remote host 25 26 -c remote_cmd launch the remote command on hosts and exit 26 27 -p launch in parallel (only with -c) with command parallel or xargs … … 51 52 # get options 52 53 if [ $# -eq 0 ]; then usage; exit 1; fi 53 while getopts "w:o: c:fvph" options54 while getopts "w:o:d:c:fvph" options 54 55 do 55 56 case ${options} in … … 60 61 else 61 62 usage 62 exit 263 exit 4 63 64 fi 65 ;; 66 d) 67 if echo ${OPTARG} | egrep -q '^[[:digit:]]+$' && [ ${OPTARG} -gt 0 ] 68 then 69 export delay_time=${OPTARG} 70 else 71 usage 72 exit 5 73 fi 64 74 ;; 65 75 c) … … 69 79 else 70 80 usage 71 exit 281 exit 6 72 82 fi 73 83 ;; … … 81 91 else 82 92 usage 83 exit 293 exit 7 84 94 fi 85 95 ;; … … 285 295 =head1 SYNOPSIS 286 296 287 tssh [-w number] [-f] [-v] [-h] [-p] [- c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+297 tssh [-w number] [-f] [-v] [-h] [-p] [-d delay_time] [-c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+ 288 298 289 299 =head1 OPTIONS … … 300 310 301 311 Fast, no nmap scan to eliminate sleeping computer 312 313 =head2 C<-d delay_time> 314 315 When use C<tmux> context, 316 add a small delay in second before lauching the second shell 317 to let C<tmux> the time to open the window (default 0.8). 302 318 303 319 =head2 C<-c remote_cmd> … … 392 408 =head2 C<delay_time> 393 409 394 When use with C<tmux>, 395 add a small delay before lauching the second shell to let C<tmux> open the window (default 0.8) 410 See option C<-d>. 396 411 397 412 =head2 C<split_number>
Note: See TracChangeset
for help on using the changeset viewer.