title: AIX Shell function to tail a log file for a specific string or for a specific time
body: <p>I am searching for a way to accomplish this on our AIX v7 platform. I do not have a strong unix(AIX) background, but am trying to write bash scripts to preform repetitive functions. </p>
  
  <p>Very simply, I would like the bash script to wait until a certain string appears at the end of the log.   The string could already exist in the log elsewhere.</p>
  
  <p>I have read responses to similar questions and the answers are using options not available on our system. Here are the responses I have found: 
  1) uses read (-t option not available in our AIX version)
  <a href="https://stackoverflow.com/questions/13983572/shell-function-to-tail-a-log-file-for-a-specific-string-for-a-specific-time">Shell function to tail a log file for a specific string for a specific time</a></p>
  
  <p>2) Uses pstree (pstree not installed) 
  <a href="https://stackoverflow.com/questions/15971121/unix-to-tail-solution-for-waiting-for-a-specific-string-or-quitting-after-a-time">Unix to tail solution for waiting for a specific string or quitting after a timeout</a></p>
  
  <p>3) Uses timeout (timeout is not installed)
  <a href="https://stackoverflow.com/questions/16368382/run-tail-f-for-a-specific-time-in-bash-script">Run tail -f for a specific time in bash script</a></p>
  
  <p>4) Uses tail --pid (--pid option is not available)</p>