But seeing the setting instruction, it's too inconvenient.
There are too many parameter to set.
So I write a simple ruby script to implement this multiple upload function.
usage: ./multi-upload directly_you_want_to_upload
script:
#! /usr/bin/ruby
arr = IO.readlines("node_list")
arr.each { |x|
puts "node name:#{x.chomp}"
cmd = "scp -r #{ARGV[0]} ACCOUNT@#{x.chomp}:/home/ACCOUNT"
puts `#{cmd}`
}
See, 9 lines code can do the same thing.
Why don't use it?
沒有留言:
發佈留言