#!/bin/bash
echo ....Script by Aravindh kudiyarasan...
array=(alfresco jboss WAS)
for i in "${array[@]}"; do
var=$(ps -ef |grep java |grep -i $i |cut -d"=" -f1)
if [ -n "$var" ]; then
echo *** Application $i is Running ***
fi`enter code here`
done
答案 0 :(得分:-1)
替换
echo *** Application $i is Running ***
通过
echo "*** Application $i is Running ***"