#!/bin/sh
#] 
#] *********************
#] $ bash "$d_bin"'waitPID test.sh' 
# www.BillHowell.ca  19Apr2024 initial 
# view in text editor, using constant-width font (eg courier), tabWidth = 3


#24************************24




#24************************24
# List of operators, generated with :
# $ grep  "^#]"  "$d_bin"'waitPID test.sh' |  sed "s/^#\]/  /" 

#




#08********08
# Setup 

source  "$d_bin""standard header.sh"



#08********08
# code 

	firefox 
	firefox  'https://www.tradingview.com/#brokers'
	ps l  |  grep  'firefox'  >"$d_temp"'waitPID temp.txt'
	PID=$(  tail -1 "$d_temp"'waitPID temp.txt'  |  sed  's|^[0-9]  [0-9]\{4\}  \([0-9]\{6\}\).*|\1|'  )
	sleep 2s
	echo  "PID = $PID"
	echo  'log on to Trading View, then close the browser window'
	bolOpen=1
#	while  [[ 1 ==  "$bolOpen" ]];  do 
#		sleep 1  
#		bolTst=$( ps -e  |  grep  $PID )
#		if [[ -z "$bolTst" ]];  then  bolOpen=0;  fi   
#	done 
	echo 'done'


#08********08
# Procedures -  To run :



#08********08
# run - select one of options



# $ bash  "$d_bin"'waitPID test.sh'  

# enddoc
