If I write a function in my .bashrc
that I can invoke through an alias:
alias myalias='f(){ echo $EXPORTED_VAR/run_script.sh /usr/local/software_dir/DIR2024a ; unset -f f; }; f'
and then I call this alias in my bash terminal, I can see it echoed in my terminal but it is not executed. If I copy and paste the same echoed text in my terminal, then the script is executed. I don’t even need source
or .
before the executable.
Why is it so and how can I modify my alias/function?