Observation1logic.sh#!/bin/bash#get system metrics#do stuff and echo itecho put metrics | nc $ip $portecho Metrics $metricsrun_logic.sh#!/bin/bashwhile true;do  sh logic.sh >> test.log 2>&1 &  sleep 60donestart_logic.sh#!/bin/bashcase $1 in  start)       #start the run_logic.sh       ;;   stop)      #stop the run_logic.sh      ;;    *)     echo Invalid Option!     exit 1esacexit0Observation2logic.sh#!bin/bashwhile true;do  #do stuff and echo it  #get System Metrics and put it  echo $stuff  sleep 60donestart_logic.sh#!/bin/bashcase $1 in  start)       #do some stuff, check already started or not       sh logic.sh >> test.log 2>&1 &       ;;   stop)      #do some stuff      #Kill the process      ;;    *)     echo Invalid Option!     exit 1esacexit0Now!, In observation1, the scripts are dying in middle of execution. I checked the logs, but I didn't see any error messages. In observation2, the scripts works fine(99% fine!). So, what is difference observation1 and observation2, why scripts are dying in the first case?
Why my shell scripts are dying?
shell