All Questions
Tagged with tilde environment-variables
1
question
5
votes
1
answer
1k
views
Tilde expansion vs. variables in Bash
Please, consider the following snippet:
$ export xx=foo
$ sudo bash -c 'echo $xx ~'
/root
Which is ok. We can't see xx.
However, if I expose it:
$ sudo -E bash -c 'echo $xx ~'
foo /home/xropi
Though ...