defining a variable from the command prompt

J

Jeff Miller

hello,
I have a script that sends emails out to my company, and I would like
to be able to run it by saying (from the command prompt):

sendemail.rb "this is my message"

then it would take "this is my message" and use that as @msg or
something. I know its possible, but I'm still pretty new to Ruby and not
sure how to do this.

Any help is appreciated!

Thanks,
- Jeff Miller
 
P

Peña, Botp

IyBzZW5kZW1haWwucmIgInRoaXMgaXMgbXkgbWVzc2FnZSINCg0KZmFxLiByZXNlYXJjaCBvbiBB
UkdWDQoNCmVnLA0KDQpDOlxmYW1pbHlccnVieT5jYXQgdGVzdC5yYg0KbXNnID0gQVJHVlswXSB8
fCAidXNpbmcgZGVmYXVsdCINCnB1dHMgbXNnDQoNCkM6XGZhbWlseVxydWJ5PnRlc3QucmINCnVz
aW5nIGRlZmF1bHQNCg0KQzpcZmFtaWx5XHJ1Ynk+dGVzdC5yYiAidGhpcyBpcyBhIHRlc3QiDQp0
aGlzIGlzIGEgdGVzdA0KDQpraW5kIHJlZ2FyZHMgLWJvdHANCg==
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top