Pushover notifications from ChatGPT using bash/shell command gptn
Open your terminal (connected via PuTTY) and create a new file named gptn in your home directory:
nano ~/gptn
Paste the script into the file
then Press CTRL+X, then Y, and then ENTER to save the file and exit the editor.
then run the following commands one after the other to move the script and make it executable:
sudo mv ~/gptn /usr/local/bin/gptn
sudo chmod +x /usr/local/bin/gptn
Now you can run the script from anywhere in your terminal by typing:
gptn your prompt here
if you need/want to update the script. do the following, presuming you already created it, before.
Open the existing script in an editor:
sudo nano /usr/local/bin/gptn
edit the script.
press control+6 ... high light it all... then control+k to remove everything there.. .then replace the script.
Press CTRL+X, then Y, and then ENTER to save the file and exit the editor.
it should already be executable, you can ensure it by running:
sudo chmod +x /usr/local/bin/gptn
Now, your script should be updated and ready to use with the new improvements. You can run it as usual with:
gptn your prompt here