Sample - Linux Shell Script to send SMS using SMSCMD You can register your email to get password and free SMS to test Actually, you can run smscmd directly . No shell script required. |
Sample 1 - Email account and Password input in Shell Script |
# Assume the smscmd command is under /home/david . # Text and mobile # input from console as $1 and $2 #!/bin/bash cmd="/home/david/smscmd" account="registered@sms4mail.com" pwd="password" run="$cmd '$1' '$2' '$account' '$pwd' " eval $run |
Sample 2 - Email account and Password input from encrypted file |
# Assume the smscmd command is under /home/david . Put
sms4mail.txt in /home/david and run smscmd genkey first to encrypt
password file # Text and mobile # input from console as $1 and $2 #!/bin/bash cmd="/home/david/smscmd" run="$cmd '$1' '$2' " eval $run |