bash Notification script help [Solved]

Come up with a useful post-processing script? Share it here!
Post Reply
phyzical
Newbie
Newbie
Posts: 9
Joined: October 10th, 2015, 8:39 pm

bash Notification script help [Solved]

Post by phyzical »

Hey there im not sure if this is the right place but im just trying to make a simple slack notifier

Code: Select all

#!/bin/bash

curl -X POST -H 'Content-type: application/json' --data '{"text":"*$1* \n*$(2)* \n${3}"}' https://hooks.slack.com/services/SECRET
This posts to my channel fine, my issue is that 1,2 and 3 dont seem to be passed through to the script as arguments it just posts a literal $1 $(2) ${3}

can anyone see what i messed up.

I also try nzb-notify.py but that seemed to not post at all

thanks!
Last edited by phyzical on February 11th, 2020, 5:19 am, edited 1 time in total.

phyzical
Newbie
Newbie
Posts: 9
Joined: October 10th, 2015, 8:39 pm

Re: bash Notification script help

Post by phyzical »

DERP as i posted this i realized i can just call the bash script to test it >.>

Code: Select all

#!/bin/bash

curl -X POST -H 'Content-type: application/json' --data '{"text":"*'$1'* \n*'$2'* \n'$3'"}' https://hooks.slack.com/services/SECRET
so what i needed as the $ was lost

thanks rubberduckies

Post Reply