I recently switched from tcsh to bash, and I'm used to being able to do things like sudo `alias netstat` but since alias gives name=value in bash, I can't do this anymore. Is there an equivalent in bash, so I don't have to do sudo `alias netstat | sed -r "s/.*='(.*)'/\1/"`?
| |||
|
feedback
|
|
You're trying to have bash expand aliases after
...and | |||
|
feedback
|
|
Bash stores its list of aliases in the associative array
There's still a lot that won't work with this, like e.g. nested aliases. | |||
|
feedback
|
.bashrc. Problem solved. – Daniel Beck Jan 1 at 9:10