Using Cygwin on Windows 10. In ~/.bashrc, I write:
test=hola
alias add_hello="echo $1; echo hello"
alias add_hello2="echo $test; echo hello"
which, when both are run, results in:
$add_hello hola
hello hola
$add_hello2
hola hello
Why would these be run in different order? I have tried unaliasing them and simply redefining them without using .bashrc but the issue is the same. Also, writing a script called "add_hello":
#!/bin/bash
echo $1; echo hello
will work:
$./add_hello hola
hola
hello