This is my code
#!/bin/bash
PING_STATUS="${netcat -vz mc.bella.wtf 25565}"
curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "Server Status:","color": 16027903,"description": "'"$PING_STATUS"'"}]}' "$WEBHOOK"
I get this when running it
mc@ubuntu:~$ serverping
./server/server/ping: line 3: ${netcat -vz mc.bella.wtf 25565}: bad substitution
I already tried escaping the -
and .
to be sure
EDIT: solved
I had to use () instead of {}