2
2
I'm stuck with the following problem.
I've defined an alias in .bashrc
(and .bash_profile
):
alias echo2="echo"
This works well:
$ echo2 "test"
test
However, if I try to use it after a redirect, it doesn't work:
ls | awk '{print "echo2 "$1}' | bash
bash: line 1: echo2: command not found
bash: line 2: echo2: command not found
...
Does someone know why? How I could make it work?