This article is from the Amiga FAQ, by Ignaz Kellerer with numerous contributions by others.
*Q:* I want to send an ARexx command through CLI or through a shell script, but that (rx ADDRESS PORTNAME;COMMAND) doesnt work.
*A:* You have to put quotation marks. (rx "ADDRESS PORTNAME;COMMAND"). It also prevents upcasing the portname when it should be lowercase.