title: Exit Child Script without Exiting Parent Script
body: <p>I have a parent script that calls a child script. Within a child script is an <code>exit 1</code> command. </p>
  
  <p>How do I exit the child script without stopping the parent script? </p>
  
  <p>main code of parent_script</p>
  
  <pre><code>while read p; do
      report_name=`echo $p | awk -F "," '{print $1}'`
      script_check=`echo $p | awk -F "," '{print $7}'`
  
      var_check=`ls | grep "$report_name"* | head -1`
      if [[ $var_check != "" ]]; then
          if [[ $script_check == "suppress.sh" ]]; then
              $HOME_DIR/scripts/suppress.sh "$var_check" &gt;&gt; $HOME_DIR/scripts/log/suppress.sh.${DAY}.log
              echo "$?" error
          fi
      fi
  
      echo "$report_name"
  
  done &lt; $HOME_DIR/scripts/reports_dir_config
  </code></pre>
  
  <p>this loops through a lookup file and when condition is met it call the child script "suppress.sh" </p>
  
  <p>child script contains code like this. </p>
  
  <pre><code>if [ blahblah ]
  then
          call function
          exit 1
  fi
  </code></pre>
  
  <p>I'm new with unix scripting so I'm learning as I code. Any advise is appreciated. </p>