I've a executable named say "sortx". Now I want to write a C program which transforms this executable into a shell command.
ex: ./sortx numbers.txt
After running the C program on "sortx" what I want is :
sortx numbers.txt
Add the directory in which sortx is present to $PATH. This way you could execute your program locally, like,
sortx numbers.txt
To add directory ~/my_bin to the beginning of the $PATH environment variable, add or update this in your .bash_profile:
PATH=~/my_bin:$PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With