Closed ralfyang closed 5 years ago
it_container(){ env_chk=$(${Comm} exec -it ${ProcessorAIDArray[$1]} $Shell_cmd -c "echo \"OK\"" > /tmp/env_chk) if [[ $(grep "OK" /tmp/env_chk) != "" ]];then Shell_cmd="/bin/bash" else Shell_cmd="/bin/sh" fi rm -f /tmp/env_chk ${Comm} exec -it ${ProcessorAIDArray[$1]} $Shell_cmd -c "echo \"alias ll='ls -lai'\" >> ~/.bashrc && $Shell_cmd" }