I am trying to just put bash commands into a variable and later run with exit code function.
command1="$(awk -v previous_date=$reply -f $SCRIPT_HOME/tes.awk <(gzip -dc $logDir/*) > $OUTFILE)" # Step 1
check_exit $command1 # Step2
Here it runs the command in step 1 and always returns 0 exit code.
How Can I put commands in a variable and later run with exit function.