Skip to content

Instantly share code, notes, and snippets.

@thiagomr
Last active June 23, 2016 21:23
Show Gist options
  • Select an option

  • Save thiagomr/2d7b2761050bb706009e310e72dfb70d to your computer and use it in GitHub Desktop.

Select an option

Save thiagomr/2d7b2761050bb706009e310e72dfb70d to your computer and use it in GitHub Desktop.
#!/bin/bash
args=("$@")
token=${args[0]}
number=${args[1]}
message=${args[2]}
numbers=(${number//,/ })
for i in "${!numbers[@]}"
do
curl -s -X POST -H "Authorization: Basic '$token'" \
-H "Cache-Control: no-cache" \
-d '{ "to": '${numbers[i]}', "message": '"\"$message\""' }' \
"https://sms-api-pointer.pontaltech.com.br/v1/single-sms" >> /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment