The type builtin: executable files #mg5 , valid_command o/p confusion

how it knows , valid_command is present atvalid_command is /usr/local/bin/valid_command , from ``PATH=“/usr/bin:/usr/local/bin:$PATH” ./your_program.sh

Hey @PrakharMNNIT, it basically comes down to two steps:

  1. Split the PATH variable into a list of directories.
  2. Iterate over each directory in that list and check for the command.

Let me know if you’d like further clarification!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.