Saturday, September 13, 2014

Pass variables by reference in Bash

function dref() { echo $(eval expr \"\$$1\"); };

$ dref  PATH
/usr/local/bin:/usr/bin:...

No comments:

Post a Comment