Title: 日常总结[我的时间线]@

Categories: all

Description: 日常总结,长文

Keywords: Java,Golang,Python,Shell,C#

总结日常遇到的问题,以及解决办法,总结每天遇到的问题。

2017-12-22 [shell]

```bash

!/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