presto is distributed SQL query engine ,
and when we installed the presto then it should be created the following home folder
/application/DB/presto/presto-server-0.216
so we can say that
in order to capture the home presto we can do ( its part of my bash script )
PRESTO_HOME=` find /application/DB/presto/ -maxdepth 1 | grep presto-server `
echo $PRESTO_HOME
/application/DB/presto//presto-server-0.216
BUT ... since some users can rename the folder under /application/DB/presto/ in order to install new version
then under /application/DB/presto , we can get the following folders:
/application/DB/presto/presto-server-HOLD_0.211
/application/DB/presto/_presto-server-0.212
/application/DB/presto/backup_presto-server-0.216.new
/application/DB/presto/presto-server-0.210.old
/application/DB/presto/presto-server-0.212.orig
so regarding that
what is the right syntax in order to find the real path as
/application/DB/presto/presto-server-0.216
notes:
presto folder structure is always with
presto-server-[ any float number or integer number ]
VALID examples:
/application/DB/presto/presto-server-0.736
/application/DB/presto/presto-server-0.936
/application/DB/presto/presto-server-1
/application/DB/presto/presto-server-1.9
/application/DB/presto/presto-server-12
NON VALID examples:
/application/DB/presto/presto-server-0.736-43.previos
/application/DB/presto/presto-server-0.936_old
/application/DB/presto/orig_presto-server-1
/application/DB/presto/presto-server-1.9.bck
/application/DB/presto/presto-server-PREVIOS
/application/DB/presto/presto-server-
/application/DB/presto/presto-server-0.936_old
/application/DB/presto/orig_presto-server-1.other
/application/DB/presto/presto_server-1.9.bck
/application/DB/presto/OLD_presto-server-12-83