Changeset 134


Ignore:
Timestamp:
Dec 28, 2017, 11:07:36 AM (3 years ago)
Author:
g7moreau
Message:
  • Add comment and ls much more readable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tssh/tssh

    r133 r134  
    174174done
    175175
    176 sort -u "/tmp/${base_path}/master++" | split -l ${split_number} - /tmp/${base_path}/_
    177 
    178 for f in $(ls -1 /tmp/${base_path}/ | grep -v ^master)
     176# split master list in paquet of split_number computer
     177sort -u "/tmp/${base_path}/master++" | split -l ${split_number} - /tmp/${base_path}/__splitted_
     178
     179# loop on each split windows
     180for f in $(ls -1 /tmp/${base_path}/ | grep ^__splitted_)
    179181do
    180182   session=$(shuf -n 1 /usr/share/dict/words | tr -cd "[:alpha:]")
     
    183185
    184186   tmux -2 new-session -d -s $session "ssh ${host[0]} ${remote_command}"
    185 
    186187
    187188   for (( i=1 ; i < ${#host[@]} ; i++))
Note: See TracChangeset for help on using the changeset viewer.