Jani Ollikainen wrote: >># net_sent MACHINE What about Pizza? > > $0=net_sent > $1=MACHINE > $2=What > $3=about > .. > > So you have use quotes with the message. > > $ net_sent MACHINE "What about Beer?" You could change the script to this: #!/bin/bash machine=$1 shift echo $@ | smbclient -M $machine Then you no longer have to quote the message text.