Changeset 390
- Timestamp:
- Jun 13, 2019, 11:42:52 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tssh/tssh
r197 r390 18 18 19 19 SYNOPSIS 20 $0 [-w number] [-f] [-v] [-c remote_cmd] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+20 $0 [-w number] [-f] [-v] [-c remote_cmd] [-o ssh_option] <host1> <host2> <clusterssh class>... <hostM>- <hostN>+ 21 21 22 22 OPTIONS 23 23 -w windows to open (integer, default 16) 24 -o option to pass to ssh 24 25 -f fast, no nmap scan to eliminate sleeping computer 25 26 -v verbose … … 97 98 98 99 COPYRIGHT 99 Copyright (C) 2014-201 8, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France100 Copyright (C) 2014-2019, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France 100 101 Licence : GNU GPL version 2 or later 101 102 END_USAGE … … 103 104 104 105 export remote_command='' 106 export ssh_option='' 105 107 export split_number=16 106 108 if which tput > /dev/null … … 133 135 then 134 136 export remote_command=${OPTARG} 137 else 138 usage 139 exit 2 140 fi 141 ;; 142 o) 143 if echo ${OPTARG} | egrep -q '[[:alpha:][:digit:]]' 144 then 145 export ssh_option=${OPTARG} 135 146 else 136 147 usage … … 262 273 IFS=$'\n' host=($(cat "/tmp/${base_path}/${f}")) 263 274 264 tmux -2 new-session -d -s $session "ssh ${ host[0]} ${remote_command}; sleep ${first_tempo}"275 tmux -2 new-session -d -s $session "ssh ${ssh_option} ${host[0]} ${remote_command}; sleep ${first_tempo}" 265 276 # wait ${tempo} second to let new session start... 266 277 sleep ${tempo} … … 269 280 do 270 281 # wait ${tempo} needed in case of ${remote_command} 271 tmux splitw -t $session "ssh ${ host[$i]} ${remote_command}; sleep ${other_tempo}"282 tmux splitw -t $session "ssh ${ssh_option}${host[$i]} ${remote_command}; sleep ${other_tempo}" 272 283 tmux select-layout tiled 273 284 done
Note: See TracChangeset
for help on using the changeset viewer.