I must read the log until I receive “Server Startup
”.
When I get the string “startup
”, I must exit the tail
command and proceed through the rest of the script operations.
Now the syntax is:
cd /opt/path/path/path
LOG_FILE=$(ls -ltr | tail -1 |awk '{print $9}')
tail -f $LOG_FILE
Thanks in advance