Skip to main content

All Questions

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 ...
xropi's user avatar
  • 93