Context
After exporting a script to ~/bin/script_name
and running it successfully from the CLI at an arbitrary place with: script_name
, I have updated the content of the script. However, this update is not reflected in the behaviour.
Old content:
#!/bin/bash
echo "Old world"
New content:
#!/bin/bash
echo "Hello world"
I saved the file, and reopened it, and it shows the new content.
Expected output:
Hello world
Actual output:
Old world
Question
How can I ensure the renewed content from the ~/bin/script_name
is used when I call it from an arbitrary location using: script_name
?
Attempts
First I tried closing and re-opening the terminal. Then I tried rebooting, both show the same, unexpected (to me) behaviour.
Additional information
Ubuntu 22.10, and the $PATH
content is:
/home/name/miniconda/envs/snncompare/bin:/home/name/miniconda/condabin:/home/name/.local/bin:/home/name/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin