Changeset 128 for trunk/tssh
- Timestamp:
- Jun 13, 2017, 2:38:01 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tssh/tssh
r126 r128 26 26 -h help 27 27 28 DEPEND 28 DEPENDS 29 29 On Debian, you need the package 30 30 31 31 apt-get install tmux ncurses-bin wamerican nmap 32 32 … … 38 38 This is not mandatory for general use. 39 39 40 By default, tssh use tput to know the number of columns and lines of your terminal. 41 It takes 10 lines and 40 columns for each windows by default. 42 If tput is not installed, the default is 16 windows... 43 40 44 AUTHOR 41 45 Gabriel Moreau … … 47 51 } 48 52 53 export remote_command='' 49 54 export split_number=16 50 55 if which tput > /dev/null … … 61 66 # get options 62 67 if [ $# -eq 0 ]; then usage; exit 1; fi 63 while getopts "w: fvh" options68 while getopts "w:c:fvh" options 64 69 do 65 70 case ${options} in … … 68 73 then 69 74 export split_number=${OPTARG} 75 else 76 usage 77 exit 2 78 fi 79 ;; 80 c) 81 if echo ${OPTARG} | egrep -q '[[:alpha:]]' 82 then 83 export remote_command=${OPTARG} 70 84 else 71 85 usage … … 160 174 IFS=$'\n' host=($(cat "/tmp/${base_path}/${f}")) 161 175 162 tmux -2 new-session -d -s $session "ssh ${host[0]} "176 tmux -2 new-session -d -s $session "ssh ${host[0]} ${remote_command}" 163 177 164 178 165 179 for (( i=1 ; i < ${#host[@]} ; i++)) 166 180 do 167 tmux splitw -t $session "ssh ${host[$i]} "181 tmux splitw -t $session "ssh ${host[$i]} ${remote_command}" 168 182 tmux select-layout tiled 169 183 done
Note: See TracChangeset
for help on using the changeset viewer.