Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Thu, 26 Aug 1999 12:13:22 +0200 (CEST) From: Pontus Lidman X-Sender: pontus AT atlas DOT mathcore DOT se To: cygwin AT sourceware DOT cygnus DOT com Subject: MS-DOS CR/LF compatibility in $() and ``? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII It seems that when the output of a command contains MS-DOS newlines (CR+LF), these are not stripped from the end of the output when command substitution is done. Example: echo -e "test\r\n" >file VAR=`cat file` echo xxx${VAR}yyy this will produce the output yyytest which indicates that there is a newline or carriage return at the end of the text of the variable. This is very unfortunate e.g. if the text was supposed to be a filename because test -f "$VAR" will fail even if the intended file exists. Is there a way to get around this problem (Cygwin B20)? Regards, Pontus -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com