LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to perform a command from another Path (https://www.linuxquestions.org/questions/linux-general-1/how-to-perform-a-command-from-another-path-4175491883/)

massy 01-20-2014 05:54 AM

How to perform a command from another Path
 
For example echo;
type -a echo

echo is a shell bultin
echo is /bin/echo
echo is /usr/local/bin/echo

I want to use third part of it.

TenTenths 01-20-2014 06:52 AM

In general just provide the full path the command / file you want to use in your script or on the command line.

For example in a bash script:

Code:

#!/bin/bash

echo "This is the shell builtin"
/bin/echo "This is /bin/echo"
/usr/local/bin/echo "And this is from /usr/local/bin/echo"



All times are GMT -5. The time now is 10:08 AM.