Sponsored Content
Top Forums Shell Programming and Scripting Script that performs action when receiving an SMS. Post 303031593 by RudiC on Saturday 2nd of March 2019 01:35:35 PM
Old 03-02-2019
Welcome to the forum.


A few comments first:
- Please use code tags to improve readability and understandability of your code and data.
- exercise utmost care when composing your spec: a leading (or missing) slash can make a huge difference in the functioning (or mal-) of your script (here: /var vs var)
- WAY too many spaces. Your code given above will not run. NO spaces around = and / , and following $ . Too few around [ and ] .



When reading your request, my first thought was: a system like that should have hooks (or so) to trigger actions on events like incoming mail. Et voila, from the project homepage:

Quote:
The program can be run as a SMS daemon which ... can run other external programs or scripts after events like reception of a new message ...
Did you consider that functionality, which is to be preferred over repeatedly listing directory contents?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sending SMS Via Unix Script?

Hi, Is it possible to send sms to a mobile from unix box using Shell Scripting? I really wonder if anyone can help me with some information regarding how to setup the environment if possible. Iam also searching and trying to setup the same. My Environment: HP-UX B.11.11 U 9000/800... (2 Replies)
Discussion started by: Omkumar
2 Replies

2. HP-UX

sending sms through shell script

pl. if any one can help me in this . i wouldlike to know if there is a way to send sms through unix box. i have tried using mailx option. but what type of servers will be required . if any one can give me references... Thankxs in advance Regards, Alpa (1 Reply)
Discussion started by: alpareshamwala
1 Replies

3. UNIX for Dummies Questions & Answers

run a perl.script upon receiving an email in Sendmail

Hi All I am newbie with Sendmail and Linux in general. We use sendmail for outgoing and incoming mails. Once our server receives a certain email xxx@yyy.com we would like to run a PERL script doing some task wiht it. Can you address me a little bit on that topic? In order to do that the... (0 Replies)
Discussion started by: manustone
0 Replies

4. Shell Programming and Scripting

Need help with SMS script...

I use the SMS script on this page: http://www.prescriptionpc.com/TEST_newpage1.html#section=sms The “functions” work fine, but after clicking “submit” and receiving the “thank you” message, nothing happens. I find it odd that I can send a text message to myself choosing my carrier (Virgin... (0 Replies)
Discussion started by: Bruce1969
0 Replies

5. Solaris

Help with SMS sending Script

I would like assistance on a script that could send a text message to my mobile phone when I run a command and the text should be send only if a condition is met. I want to have a cron-job running every 10 minutes to check the system for overload conditons with a command: more logfile.log | grep... (5 Replies)
Discussion started by: thinktank
5 Replies

6. Shell Programming and Scripting

Bash script to send SMS

Hey guys I was wondering how to go about creating a bash script to send SMS..any ideas are appreciated.. (2 Replies)
Discussion started by: blackzeus
2 Replies

7. Shell Programming and Scripting

Script to performs checks

Hi , I need a script which performs below activity I have one file named "testfile" in 9 different directories with same name. I want to perform below action with each testfile of each directory. if ; then mv listfiles listfiles_`date +%b%y` else echo No Such files fi ... (4 Replies)
Discussion started by: sv0081493
4 Replies

8. Shell Programming and Scripting

Sending sms through Shell script

Can anyone please help me to in scripting of sending sms through shell script (1 Reply)
Discussion started by: gargidas15
1 Replies

9. Homework & Coursework Questions

Script performs the right task but fails against check

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a script checkFiles.sh that takes an arbitrary number of file paths from the command line and carries ... (5 Replies)
Discussion started by: Ezraek
5 Replies
DEVD(8) 						    BSD System Manager's Manual 						   DEVD(8)

NAME
devd -- device state change daemon SYNOPSIS
devd [-dnq] [-f file] [-l num] DESCRIPTION
The devd daemon provides a way to have userland programs run when certain kernel events happen. The following options are accepted. -d Run in the foreground instead of becoming a daemon and log additional information for debugging. -f file Use configuration file file instead of the default /etc/devd.conf. If option -f is specified more than once, the last file speci- fied is used. -l num Limit concurrent socket connections to num. The default connection limit is 10. -n Do not process all pending events before becoming a daemon. Instead, call daemon right away. -q Quiet mode. Only log messages at priority LOG_WARNING or above. IMPLEMENTATION NOTES
The devd utility is a system daemon that runs in the background all the time. Whenever a device is added to or removed from the device tree, devd will execute actions specified in devd.conf(5). For example, devd might execute dhclient(8) when an Ethernet adapter is added to the system, and kill the dhclient(8) instance when the same adapter is removed. Another example would be for devd to use a table to locate and load via kldload(8) the proper driver for an unrecognized device that is added to the system. The devd utility hooks into the devctl(4) device driver. This device driver has hooks into the device configuration system. When nodes are added or deleted from the tree, this device will deliver information about the event to devd. Once devd has parsed the message, it will search its action list for that kind of event and perform the action with the highest matching value. For most mundane uses, the default handlers are adequate. However, for more advanced users, the power is present to tweak every aspect of what happens. The devd utility reads /etc/devd.conf or the alternate configuration file specified with a -f option and uses that file to drive the rest of the process. While the format of this file is described in devd.conf(5), some basics are covered here. In the options section, one can define multiple directories to search for config files. All files in these directories whose names match the pattern *.conf are parsed. These files are intended to be installed by third party vendors that wish to hook into the devd system without modifying the user's other config files. Since devctl(4) allows only one active reader, devd multiplexes it, forwarding all events to any number of connected clients. Clients con- nect by opening the SOCK_SEQPACKET UNIX domain socket at /var/run/devd.seqpacket.pipe. FILES
/etc/devd.conf The default devd configuration file. /var/run/devd.seqpacket.pipe The socket used by devd to communicate with its clients. /var/run/devd.pipe A deprecated socket retained for use with old clients. SEE ALSO
devctl(4), devd.conf(5) AUTHORS
M. Warner Losh BSD
August 14, 2014 BSD
All times are GMT -4. The time now is 08:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy