I've bash script written to read each line of a file which has commands and execute them one by one and stops when a command fails.while read -r linedo$line || exit 1done< /root/ansi-pb/sample.txtsample.txt has following commandsecho hello worldfree -mmvn -versiondateecho byeI want to improvise this script, so If I encounter any failed command I would correct it in text file and when I rerun the script it should start only from failed command but not from the beginninghow can i achieve this?
run shell script from where it stopped execution
bash;shell