다수의 원격 쉘과 동시에 통신할 수 있는 프로그램
Programs that can communicate simultaneously with multiple remote shells
This code need to install Docker in advance
docker compose up -d –build
docker compose exec -it clsh /bin/bash
source /home/ubuntu/.bashrc
clsh -h work01,work02,work03 cat /proc/loadavg
clsh wait output during 1.5 second and if no output is given during 1.5 sec, clsh doesn't wait output anymore.
name of host that you want to connect. you can write several names at once and there muse be an ',' between names. (ex. clsh -h work01,work02 pwd) if you don't give name clsh automatically find "CLSH_HOSTS" environment variable. if CLSH_HOSTS doesn't exist, automatically find "CLSH_HOSTFILE" environment variable. finally if this two variables don't exist, clsh try to find ".hostfile" file that has name of hosts.
name of file that contain remote host names (ex. clsh --hostfile=hostfile.txt pwd)
name of file that clsh will write standard out (ex. clsh --out=output.txt -h work01 pwd)
name of file that clsh will write error (ex. clsh --err=error.txt -h work01 asdf)
if you give "-i" option clsh turn on interactive mode. In interactive mode you can communicate one specific remote shell. if you type just name of host, you can communicate 1:1. To return original clsh shell, you should type "clsh". and if you type "!" in front of command. The command will execute in clsh local shell.