I am using the bash shell. Today talking with a colleague, he told me something that I found surprising and I would like to confirm it.
Say I have a shell script like this
#!/bin/bash
set -eu
python some_really_long_script.py
So I start executing it by running ./the_shell_script.sh
.
Now, the command takes time. Probably hours.
My question is, if I edit this script file like this
#!/bin/bash
set -eu
python some_really_long_script.py
python some_other_really_long_script.py
and I save it, will the next command be executed after the first one?
I thought that the script was read to memory and executed so editing would have no impact but I was told this is possible.
EDIT1
I am calling my sh from a container with these details
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
I checked and outside the container the release is different