Fixed bug: matches *.war only during list applications

This commit is contained in:
2020-04-09 20:30:34 +08:00
parent 66233ee89e
commit 5503dd82fd
+2 -2
View File
@@ -13,7 +13,7 @@ base_usr=`whoami`
base_home=`cat /etc/passwd | grep $(whoami) | cut -d ':' -f 6`
usr_sh=`cat /etc/passwd | grep $(whoami) | cut -d ':' -f 7`
war_dir=${base_home}/apps/
app_list=(`ls $war_dir | sed 's/\.war$//g'| sed 's/\-1\.0\-SNAPSHOT//g'`)
app_list=(`ls $war_dir | grep -E "*.war" |sed 's/\.war$//g'| sed 's/\-1\.0\-SNAPSHOT//g'`)
echo -e ${app_list[0]}
echo -e ${app_list[1]}
echo -e ${app_list[2]}
@@ -299,7 +299,7 @@ function_menu()
echo -e "${blue}>> Trace logging...${plain}"
echo -e ""
#tail -f ${base_home}/${cur_app}/log/${cur_app}.out
cmd="tail -f ${base_home}/${cur_app}/log/${cur_app}.out"
cmd="tail -n 50 -f ${base_home}/${cur_app}/log/${cur_app}.out"
inject ${cmd}
break
;;