I want to know which executable gets executed for any command in bash.
Example:
- I have firefox installed here
/usr/bin/firefox
, it is in the$PATH
alias browser=firefox
alias br=browser
Now I want to type something like getexecutable "br"
and it should display /usr/bin/firefox
type
. – saiarcot895 Jul 23 '15 at 21:34alias a='echo b; cat c | tac'
. Type will do as much as possible; any more, you can write a script to parse the output of type and run type recursively until it's what you want, but prepare for it to break in cases like the one I mentioned above. – Muzer Jul 23 '15 at 22:21Ctrl-Meta-e
to expand aliases on the command line one level each at the time. – jimmij Jul 23 '15 at 22:24