If I have a function like so:
#!/usr/bin/env bash
function foo {
}
and the above function is in .bash_profile, or somewhere.
If I use which foo
it won't give me the location of this command in the shell script.
Is there some way for me to discover where it's located or is grep
my best bet?
#!…
) is not part of the function, and including it in the question is misleading, given that the function is probably defined in a file that doesn't use a shebang. – G-Man Says 'Reinstate Monica' Nov 27 '17 at 21:49