Hello, Am Donnerstag, 13. September 2018, 03:38:00 CEST schrieb Carlos E. R.:
On usenet, this has been suggested:
#!/bin/sh # How long the friend has before the message times out, in seconds TIMEOUT=36000
# The email address(es) to send a notice to EMAIL=email@example.com otheremail@somewhere.else
I hope you have the most important mail address first, because # EMAIL=email@example.com otheremail@somewhere.else bash: otheremail@somewhere.else: command not found EMAIL="email@example.com otheremail@somewhere.else" will work much better ;-)
if xmessage -buttons "Yes I am:1,I need help:0" \ -default "I need help" \ -timeout $TIMEOUT -nearmouse "Are you well?" then echo "Your friend failed to confirm his health at $(date)" | mailx -s "Your friend requires help" $EMAIL
Just for completeness - Using $EMAIL without quotes is correct here.
xmessage -timeout 30 -nearmouse "I have sent an alert message to $EMAIL" fi # END of script
Regards, Christian Boltz PS: random signature - but I'll probably need to check if fortune's signature picker is really random, or if it has started reading my mails and developed some AI to pick matching signatures ;-) -- <victorhck> "currently running an inferior operating system" aka Windows <ancor> victorhck: are you ok? Do you want us to call someone? [from #opensuse-project] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org