ppm
is a Bash script for executing Python files, capturing output, and sending logs via email. It also includes a man page for usage instructions.
-
Clone this repository:
git clone https://github.com/DanishjeetSingh/ppm.git cd ppm
-
Make the script executable:
chmod +x ppm
-
(Optional) Move the script to a directory in your
PATH
. Common directories are/usr/local/bin
or~/.local/bin
. For example:sudo cp ppm /usr/local/bin/
-
Install the man page:
sudo cp ppm.1 /usr/share/man/man1/ sudo mandb
If you prefer not to move the script, you can add its directory to your PATH
environment variable:
-
Open your shell's configuration file in a text editor (e.g.,
.bashrc
,.bash_profile
, or.zshrc
).nano ~/.bashrc
-
Add the following line to the end of the file, replacing
/path/to/ppm
with the actual path to the directory containing your script:export PATH="$PATH:/path/to/ppm"
-
Save the file and reload the shell configuration:
source ~/.bashrc
To execute the script:
ppm <python_file> [args...]