#!/bin/bash
#str=$(ps axw -eo pid,command | grep "org.apache.catalina.startup.Bootstrap" | grep "start" | awk '{print $1}')
str=$(ps axw -eo pid,command |\
grep "apache" | grep "start" |\
awk '{print $1}')
echo "str = $str"
count=1
for i in $str
do
echo "string[$count]= $i"
count=$(($count+1))
done
0 意見:
張貼留言