我想创建一个输出cvs文件。我制作了一个脚本,但它没有在列中输出和输出。如何使此脚本在列中执行此操作。
info.sh script
#!/usr/bin/ksh
if [ "`uname`" = "AIX" ]; then
printf "This server is running AIX level : "
oslevel -s
echo "CPU and Memory info: "
lparstat -i | egrep "^Mode|^Entitled Capacity |^Online Memory"
echo "------------------------------"
else
echo "This is not an AIX server"
fi
这是我用户使用ssh公钥的for语句
for server in `cat serverlist`; do printf "%-20s\n" $server;
ssh -q -o "BatchMode yes" $server 'ksh 2>&1' < ./info.sh ; echo;
done | grep -v ^$