cat server.xml |grep "port="
echo ===========use awk========================================================
awk -F "\n" '{
if(match($1,/port=\".*\"/))
if(match($1,/port=.* sh/))
print gensub(/.*port=\"(.*)\" sh.*/,"\\1",1,$1);
else
print gensub(/.*port=\"(.*)\" p.*/,"\\1",1,$1);
}' server.xml