Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

How can I trigger an sms once a command is executed using shell script? for eg. cat file (one above command is executed (irrespective of the result), I should get an SMS

share|improve this question

put on hold as too broad by peterph, Archemar, Anthon, Michael Homer, heemayl 2 days ago

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Two options. One is to physically attach a cell phone to the system via serial cable or similar and use that device to send your message. That's probably not what you want... but it's the only way to do it without some kind of network connectivity.

The other is to use a remote SMS gateway service with an API you can call using a simple tool such as curl() or wget().

An example of such a service is Twillo, have a look at https://www.twilio.com/docs/api/rest/sending-messages -- there are many others, I do not endorse one or the other.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.