delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/10/15:01:21

X-Spam-Check-By: sourceware.org
Message-ID: <45A544F5.9020502@wi.rr.com>
Date: Wed, 10 Jan 2007 13:56:37 -0600
From: Joey Officer <jofficer AT wi DOT rr DOT com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin-email utility clipping attached zips
References: <006701c734d6$d8531e00$a501a8c0 AT CAM DOT ARTIMI DOT COM> <45A520B8 DOT 7090802 AT wi DOT rr DOT com> <45A52736 DOT 2040009 AT gmx DOT de> <45A5292A DOT 20606 AT gmx DOT de> <45A52E6C DOT 61D53739 AT dessent DOT net>
In-Reply-To: <45A52E6C.61D53739@dessent.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

And thank you as well Brian.

I'm still fairly new to bash scripting, and am unfamiliar with all of 
the tools that make our lives easier.

Thanks for the additions.

Regards,
joey


Brian Dessent wrote:
> Saro Engels wrote:
> 
>> I wasn't right:
>> It should be:
>> $ file=*.pdf; file=`echo $file | sed "s/ /,/g"`
>> $ echo $file
>> $ email user AT domain DOT com -s test -a $file < sample.txt
> 
> Firstly this can be simplified to simply:
> 
> email user AT example -s test -a $(echo *.pdf|sed "s/ /,/g") <sample.txt
> 
> but this will not work if any filename or pathname contains spaces.  You
> can solve that with:
> 
> email user AT example -s test -a "$(sh -c 'IFS=,; echo "$*"' -- *.pdf)" \
> 		<sample.txt
> 
> Brian
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019