当我运行此代码时,我将获取当前目录中的所有文件

时间:2018-03-09 23:14:51

标签: linux bash shell

#!/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

1 个答案:

答案 0 :(得分:-1)

替换

echo *** Application $i is Running ***

通过

echo "*** Application $i is Running ***"