procmail
[Top] [All Lists]

Re: stripping off newlines?

1998-06-03 14:15:53
Paul Evad asked,

| Any idea why:
| 
|   echo "File size shown in K (kilobytes)\n"; \
|   echo `ls -sRk1 /home/www/foobar/www/downloads`; \
| 
| would be stripping off the newlines in the resulting list?

That's not a procmail question, really; it's a shell question.  Soft quotes
around arguments to echo that include newlines, tabs, or multiple spaces, as in 

    echo "`ls -sRk1 /home/www/foobar/www/downloads`"; \
 
would preserve the original whitespacing.

| if you do
| ls -sRk1 /home/www/foobar/www/downloads
| on a shell command line, you get one big long list.
| 
| but the result via email it's just one big long string...

It's echo (without quotes) that's doing it, not procmail and not email.  If
your recipe's action line were like this,

   echo "File size shown in K (kilobytes)\n"; \
   ls -sRk1 /home/www/foobar/www/downloads; \

you'd be fine.

<Prev in Thread] Current Thread [Next in Thread>