Re: new option?
On Thu, Jun 08, 2000 at 01:59:43PM -0500, David Champion <[EMAIL PROTECTED]> wrote: > Unquoted backquotes turn all whitespace into plain spaces: > `ls a b c` => a b c > Quoted backquotes do not: > "`ls a b c`"=> a > b > c ...depending on the shell. Moreover, quoted backspaces in my implementation of sh and bash put each item from ls on a separate line, even if they weren't before. However, quotes don't have the same effect is csh. But this is a mutt mailing list, not a shell programming one... :) -- Bob BellCompaq Computer Corporation Software Engineer 110 Spit Brook Rd - ZKO3-3/U14 TruCluster GroupNashua, NH 03062-2698 [EMAIL PROTECTED] 603-884-0595
Re: new option?
On 2000.06.08, in <[EMAIL PROTECTED]>, "Lars Hecking" <[EMAIL PROTECTED]> wrote: > > In principle, yes, but it may even work without. Nevertheless, > echo -n is not portable. Unquoted backquotes turn all whitespace into plain spaces: `ls a b c` => a b c Quoted backquotes do not: "`ls a b c`"=> a b c -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago
Re: new option?
On Thu, Jun 08, 2000 at 11:50:10AM -0400, David T-G <[EMAIL PROTECTED]> wrote: > % > might want to say "echo -- -a ..." there, in case echo(1) complains. > % > % echo "-a $f" should work regardless. or even echo " -a $f". > > In all of this, though, shouldn't it be > > echo -n ... > > followed by a final > > echo "" > > to keep them all on one line? Perhaps. echo -n is not portable, though. I originally quoted the "-a $f" and then saw it worked without, too. Basically, I just jotted down something that worked on Tru64, and left a compatible implementation up to the implementor :-) -- Bob BellCompaq Computer Corporation Software Engineer 110 Spit Brook Rd - ZKO3-3/U14 TruCluster GroupNashua, NH 03062-2698 [EMAIL PROTECTED] 603-884-0595 PGP signature
Re: new option?
Lars -- ...and then Lars Hecking said... % % > In all of this, though, shouldn't it be % > % > echo -n ... % % In principle, yes, but it may even work without. Nevertheless, % echo -n is not portable. Ah, yes; that damned SysV stuff :-) In all of my must-be-portable shell scripts, I have the standard "how do i not newline?" function and use $ECHO instead of just good old echo... *sigh* Still, it could even be written *right* in one line ;-) :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! The "new millennium" starts at the beginning of 2001. There was no year 0. Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh* PGP signature
Re: new option?
> In all of this, though, shouldn't it be > > echo -n ... > > followed by a final > > echo "" > > to keep them all on one line? In principle, yes, but it may even work without. Nevertheless, echo -n is not portable.
Re: new option?
Hi, folks -- ...and then Lars Hecking said... % % > > mutt -s 'the whole deal' [EMAIL PROTECTED] `for f in *.html;do echo -a $f;done` I love the one-line method :-) % > % > might want to say "echo -- -a ..." there, in case echo(1) complains. % % echo "-a $f" should work regardless. or even echo " -a $f". In all of this, though, shouldn't it be echo -n ... followed by a final echo "" to keep them all on one line? :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! The "new millennium" starts at the beginning of 2001. There was no year 0. Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh* PGP signature
Re: new option?
> > mutt -s 'the whole deal' [EMAIL PROTECTED] `for f in *.html;do echo -a $f;done` > > might want to say "echo -- -a ..." there, in case echo(1) complains. echo "-a $f" should work regardless. or even echo " -a $f".
Re: new option?
> Bob Bell: > mutt -s 'the whole deal' [EMAIL PROTECTED] `for f in *.html;do echo -a $f;done` might want to say "echo -- -a ..." there, in case echo(1) complains. clemens
Re: new option?
On Thu, Jun 08, 2000 at 12:24:21AM -0500, Carlos P . <[EMAIL PROTECTED]> wrote: > could i suggest a new option, say -A, that > would allow one to start mutt attaching the rest > of the command line arguments, like this: > > mutt -s 'the whole deal' [EMAIL PROTECTED] -A *.pdf > > instead of having to enumerate the files: > > mutt -s 'the whole deal' [EMAIL PROTECTED] -a f1.pdf -a f2.pdf ...etc. > > it also helps in scripts when you want to run things > unattended. Why not use the following, especially if you are already in a script? mutt -s 'the whole deal' [EMAIL PROTECTED] `for f in *.html;do echo -a $f;done` Possibly use a variable in place of *.html . -- Bob BellCompaq Computer Corporation Software Engineer 110 Spit Brook Rd - ZKO3-3/U14 TruCluster GroupNashua, NH 03062-2698 [EMAIL PROTECTED] 603-884-0595
Re: new option?
Carlos P . writes: > could i suggest a new option, say -A, that > would allow one to start mutt attaching the rest > of the command line arguments, like this: > > mutt -s 'the whole deal' [EMAIL PROTECTED] -A *.pdf > > instead of having to enumerate the files: > > mutt -s 'the whole deal' [EMAIL PROTECTED] -a f1.pdf -a f2.pdf ...etc. > > it also helps in scripts when you want to run things > unattended. Especially in a shell script, this would be a trivial one-liner.
Re: new option?
On Thu, Jun 08, 2000 at 12:24:21AM -0500, Carlos P . wrote: > > mutt -s 'the whole deal' [EMAIL PROTECTED] -A *.pdf > > instead of having to enumerate the files: > > mutt -s 'the whole deal' [EMAIL PROTECTED] -a f1.pdf -a f2.pdf ...etc. > > it also helps in scripts when you want to run things > unattended. > In that case I would suggest to write a small script, which collects the filenames (via find or via shell wildcard substitution) and then generates the -a aName options by using a for loop. HTH Frank
new option?
could i suggest a new option, say -A, that would allow one to start mutt attaching the rest of the command line arguments, like this: mutt -s 'the whole deal' [EMAIL PROTECTED] -A *.pdf instead of having to enumerate the files: mutt -s 'the whole deal' [EMAIL PROTECTED] -a f1.pdf -a f2.pdf ...etc. it also helps in scripts when you want to run things unattended. thanks, ++ carlos