X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: bash scripts fail with bash3.1-8 Date: Tue, 3 Oct 2006 17:02:29 +0100 Message-ID: <00e501c6e705$5409f7f0$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <002101c6e702$9978f5f0$04fa080a@CORK.ARRISI.COM> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 03 October 2006 16:43, Turly O'Connor wrote: > By way of an example as to what broke, note that in the following > that "cleartool" is not a cygwin tool (it's a Windows executable), > writing its CRLF-terminated output to Windows' stdout. > > CHECKOUTS=`cleartool lsc -all -cvi -s` # list all my checkouts > > I used to be able to do > > for one in $CHECKOUTS ; do echo $one Hello ; done > > C:/Path/To/file1 Hello > C:/Path/To/file2 Hello > > Now it seems that "$one" above contains the binary CR, so I get: > > Hello h/To/file1 > Hello h/To/file2 > > What do I need to do to get this working again? How about CHECKOUTS=`cleartool lsc -all -cvi -s | d2u` # list all my checkouts or for one in $((echo $CHECKOUTS | d2u)) ; do echo $one Hello ; done depending on how happy cleartool is on piping output to a cygwin program. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/