#!/bin/ksh
# set array called nameservers
set -A qaservers l8sita01 l4sita06 l4dvidap2256 l98vidap2256
print -n "\nEnter the Client ID :"
read clientID
# print all name servers
for i in ${qaservers[@]}
do
ssh "uname -a; grep jms/erms/$clientID /apps/WebSphere/NA70_TBA/config/cells/CellV70_TBA/resources.xml;"
done
错误
ssh: uname -a; grep jms/erms/1212 /apps/WebSphere/NA70_TBA/config/cells/CellV70_TBA/resources.xml;: non-recoverable name resolution failure
ssh: uname -a; grep jms/erms/1212 /apps/WebSphere/NA70_TBA/config/cells/CellV70_TBA/resources.xml;: non-recoverable name resolution failure
ssh: uname -a; grep jms/erms/1212 /apps/WebSphere/NA70_TBA/config/cells/CellV70_TBA/resources.xml;: non-recoverable name resolution failure
ssh: uname -a; grep jms/erms/1212 /apps/WebSphere/NA70_TBA/config/cells/CellV70_TBA/resources.xml;: non-recoverable name resolution failure
答案1
尝试在 ssh 命令中传递 IP/主机名,希望您提供那些使用for
循环的内容。
ssh "$i" "uname -a;......"