Hi... So I get that you have to source a shell script to execute any currently defined aliases within it, effectively executing commands as if you had typed them yourself, but well, instead of explaining I'll just show you...
Code:
:> alias hi="echo hello"
:> touch test.sh
:> chmod 777 test.sh # *write some code
:> source ./test.sh
hello
hi DAD
bash: hi: command not found
---- test.sh ----
Code:
#!/bin/bash
hi
echo $(echo "hi MOM" | sed "s:MOM:DAD:")
$(echo "hi MOM" | sed "s:MOM:DAD:")
so yeah, I considered maybe it's another layer of being a "subshell" in those
$()'s, but if that were the case how would you source an expanded command?
(sorry if I'm misinterpreting the issue)
Basically, is there a workaround ?
thx to anyone who looks and gives me a reply.
-cheers & God speed !