martinBmeza / utils

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Utils scripts

Making command line commands

  1. Mark the python file as executable
$ chmod +x my_script.py
  1. Add an interpreter shebang. With this, we can drop the extension
#!/usr/bin/env python
  1. Add the program to the PATH Create a user bin directory and then add it to the PATH
$ mkdir -p ~/bin
$ cp my_script ~/bin

In order to add this to the PATH permanently, do:

  • add this line to .bash_profile in your home directory:
$ export PATH=$PATH":$HOME/bin"
  • reload the shell

About


Languages

Language:Python 100.0%