Re: [newbie] help with bash command

2003-10-29 Thread Todd Slater
On Tue, Oct 28, 2003 at 08:12:06PM -0800, Eric Huff wrote:
 I am trying to get a script to work.  It is much more complicated
 than this, but i have boiled it down to this to debug it:
 
 command='dodge plymouth'
 
 echo $command
snip 
 But when the mhmail line runs, it apears to seperate at the space:
 
 ~/a/_linux/A_mandrake/mailinglist $ ./remove.bash
 dodge plymouth
 post: bad address 'plymouth' - missing mailbox (
 ymouth), continuing...
 post: 1 address unparsable
 /usr/lib/nmh/post: exit 1
 Letter saved in dead.letter
 
 
 mhmail [EMAIL PROTECTED] -subject dodge plymouth -from
 [EMAIL PROTECTED] -body  
 
 works fine, so i know it is in the $command part...

Quote $command

mhmail to -subject $command ...

Todd

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] help with bash command

2003-10-29 Thread Eric Huff
  command='dodge plymouth'
  
  But when the mhmail line runs, it apears to seperate at the
  space:

  mhmail [EMAIL PROTECTED] -subject dodge plymouth -from
  [EMAIL PROTECTED] -body  
  
 Quote $command
 
 mhmail to -subject $command ...

Todd, somehow i figured you would have the answer.  You are
definitely the bash-man!

I swear i even had that typed in once, but was sure it would make
the subject be $command.

Thanks for the help,

eric

-- 
Mandrake HowTo's  More:  http://twiki.mdklinuxfaq.org

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Re: [newbie] help with bash command

2003-10-29 Thread Todd Slater
On Tue, Oct 28, 2003 at 11:38:03PM -0800, Eric Huff wrote:
  Quote $command
  
  mhmail to -subject $command ...
 
 Todd, somehow i figured you would have the answer.  You are
 definitely the bash-man!
 
 I swear i even had that typed in once, but was sure it would make
 the subject be $command.
 
 Thanks for the help,

No prob; when I first started with bash I ran into a lot of problems
with spaces--in filenames, in lines of a file. I asked a bunch of
questions in comp.unix.shell and while I'm not really sure I understand
variable expansion and all that stuff, I have a few scripts for these
situations that I keep relying on. Now how did I do that? Hopefully
after a little more playing around I internalize it and just know it,
like learning a foreign language.

t

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com