I have a shell script named remote_execution.sh. Is it possible that I just type remote_execution in any of the folders and the execution starts, just like gcc, vi or any such command does?
Thanks in advance.
The following four steps should allow you to run remote_execution from anywhere in your filesystem:
remote_execution, removing the .sh extensionAdd a "shebang" line to the top of the file
#!/bin/bash
Modify the permissions of the file so it is executable (see man chmod)
chmod u+x remote_execution
Move the file into a directory in your PATH so it "works in any folder". At a guess:
mv remote_execution /usr/local/bin
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