Created
April 17, 2015 19:21
-
-
Save rilinweb/55655d6156c4444cb934 to your computer and use it in GitHub Desktop.
Sending SMS from Linux using sms.ru
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71231234567 First Person | |
71231234568 Second Person | |
71231234569 Third Person |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
smsRuApiId="SMS.RU_API_ID" | |
contactsList=$(cat $HOME/scripts/contacts.csv) | |
textMessage=$(zenity --entry --title="Mesaage text" --text="Please enter text SMS message") | |
if [ -n "$textMessage" ] | |
then phoneNumber=$(zenity --list --title="Select recipient" --column="Phone Number" --column="Name" $contactsList) | |
if [ -n "$phoneNumber" ] | |
then curl -d "text=$textMessage" http://sms.ru/sms/send\?api_id=$smsRuApiId\&to=$phoneNumber | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment