I want to define an alias which references an environment variable in real time. For example, how can I make an alias to echo the value of N?
$ N=4
$ alias sayn="echo $N"
$ N=2
$ sayn
4
I want to define an alias which references an environment variable in real time. For example, how can I make an alias to echo the value of N?
$ N=4
$ alias sayn="echo $N"
$ N=2
$ sayn
4