Skip to content
Advertisement

Is there a way to retrieve the script path called by a user-defined command?

I’m a newbie in GNU/Linux and, for a project, I need to do some reverse engineering. At a given line in a script, there is a command:

dc 27 /A_PATH/ 32

I’m almost sure the “dc” command was previously added to the path/simlink/(?) by a previous developper. When executed, the command allows to run a simulation over the case indicated by the PATH. Yet, I don’t know the meaning of the two other parameters (27 and 32) and I would need to bring some change in the way the simulation is executed.

Therefore, I would like to know how to obtain the address of the executable called when a user-defined bash command is runned.

I hope the vocabulary is correct, and, thank you already for the help.

Advertisement

Answer

As stated in comments :

which <command>

or with shell built-in :

type -p <command>
Advertisement