New to korn shell

I am new to korn shell and slowly learning. Is there a way to have a parent script prompt for input and then execute a child script and return the output then move forward and ask for more input and then execute the next child script? I think the answer is no but thought i would ask.

I think you mean:

# parent script
while true   # loop forever
do
      echo  "enter input \c"
      read value  
      output=$( ./child script "$value")  # child writes answer to stdout
      echo "$output"
      # put some sort of "continue y/n" here
      echo 'continue y/n \c'
      read ok      
     
      if  [ "$ok" = "y" ]; then
          continue
      fi
      break
done 
1 Like

"next child script" means what? same script again, mayhap with a different set of parameters? Or - another script to be called?