On Thu, 8 Jul 2010, wes wrote: > I'm afraid there are multiple issues with this.
Wes, Not surprising as I copied it from a message forum and I'm far from a shell script writer. > 1. in Bash, you do not use the $ when setting the value of a variable. Also, > you don't need to tell it you are setting the value of the variable; you > Just Do It. > > all="cat list" Mea culpa! This I should have seen on my own. > 2. A "for" loop begins with a "do" command and ends with a "done" command. Ditto. > 3. You have single-quotes around 'cat msg2 | mailx -s "Test Message"' which > is going to tell Bash to treat the whole string as a single word. Ah, so. That has not penetrated before now. > for x in $(cat list);do cat msg2 | mailx -s "Test Message" $x;done Seems to have worked ... because it has worked. Many thanks! Rich _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
