layout: post
title: 日常总结[我的时间线]@
categories: all
description: 日常总结,长文
#!/bin/bash
USER=activemq
current_node=192.168.1.45
PASSWD=activemq
/usr/bin/expect <<EOF
spawn ssh $USER@$current_node
expect "*(yes/no)?*" {
send -- "yes\r"
expect "*?assword:*"
send -- "$PASSWD\r"
} "*?assword:*"
send -- "$PASSWD\r"
expect "*# "
send -- "exit \r"
EOF
# 2017-12-21 [shell]
,
劈分数据。HBASE_REGION=dscn1,dscn2,dscn3
#用 `,` split
OLD_IFS="$IFS"
IFS=","
arr=($HBASE_REGION)
IFS="$OLD_IFS"
for s in ${arr[@]}
do
ssh "$s" ls
done