0

If I have something in the bash hash, on the $PATH, is there a way to dump the contents of that script?

e.g. if I do:

$ type ores_git_push

I get:

ores_git_push is hashed (/usr/local/bin/ores_git_push)

is there a way to get the contents of the script?

if I do:

$ type -a ores_git_push

I get:

ores_git_push is /Users/oleg/.nvm/versions/node/v10.10.0/bin/ores_git_push
ores_git_push is /usr/local/bin/ores_git_push

so worse case scenario I guess I could try to parse the results from type -a.

3 Answers 3

2
cat "$(type -p ores_git_push)"
1

What about the good old cat command?

cat /usr/local/bin/ores_git_push
1

I'm not sure why the hash would matter, but you could do:

cat $(which ores_git_push)
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .