On Monday 18 October 2004 19:19, Shlomo Solomon wrote:
> I looked at the program and saw that this message means an incorrect
> number of argyments.

The program is currently designed to get all its arguments from
the command line. However...

> And the following doesn't work:
> sendsms < /tmtp/tmp-sms
> 
> where /tmp/tmp-sms is:
> me "shlomo" "this is a test message"

If getting only the message from a file is good enough for
you, than you can use the shell to achieve that effect:

  sendsms me shlomo "`cat /tmp/tmp-sms`"

Notes:
  1. Watch the backticks (not an apostrophe), this is command
     substitution in shell (i.e: the output of the command
     is substituted in its place).
  2. Only double quotes enable this. Single quote would disable
     the command substitution.

Now if you really insist that the file would contain:
  me "Shlomo" "this is a test message"

Than you can do some shell judo:
  eval sendsms "`cat /tmp/tmp-sms`"


-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

"Man cannot discover new oceans unless he has the courage to lose sight of
the shore..."

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to