Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Subject: pdksh: problem with read and string compare To: cygwin AT cygwin DOT com Message-ID: From: "Thomas Muehlfriedel" Date: Thu, 24 Apr 2003 11:13:43 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii hello all, I'm using cygwin-1.3.22 with pdksh. A script developed on linux doesn't run on cygwin because there is a 0xd in a string I read from standard input. What happens is the following A command spits out some multi-line output: $ . ../script/rep.sh sqlactivity 1.1b 1 -------------------- - 1 record(s) selected. I read the fourth line ("-") with "read xx" and try to see if it is a "-" with if [ $xx = "-" ] then bla else do something fi Under cygwin/win2k this fails because $xx contains "-0x0d". The equality op doesn't like this and always goes into the else branch. Has anyone seen this and gotten around somehow? This might actually refer to the problem reported in "Erroneous line endings (cat,gawk,text mount)" Still the thread mentioned did not give me an idea how to solve this problem. regards thomas ------------ Who is General Failure and why is he reading my harddisk? -- 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/