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 Message-Id: <200301282240.h0SMecP29787@crikeymail.franz.com> To: cygwin AT cygwin DOT com Subject: sh/rm bug -- rm doesn't remove a file when run from cmd Date: Tue, 28 Jan 2003 14:40:38 -0800 From: Kevin Layer Note-from-DJ: This may be spam I'm on Windows 2000sp3. I've seen this bug before, but it disappeared. Now, it's back. I recently updated to cygwin 1.3.19. Nothing else on my system has changed in a really long time. I rebooted, and that didn't fix it. Here's bug2.sh: ls -l $2 echo "removing $2..." rm $2 ls -l $2 First, it only happens from a cmd prompt. If I do it from a bash (started with cygwin.bat), it does _not_ fail. Using `sh', the rm fails and doesn't print anything, but using `bash' it works: D:\acl62\src\cl\src>ls -l foo.out -rw-r--r-- 1 layer None 6 Jan 28 13:28 foo.out D:\acl62\src\cl\src>sh bug2.sh xxx foo.out -rw-r--r-- 1 layer None 6 Jan 28 13:28 foo.out removing foo.out... -rw-r--r-- 1 layer None 6 Jan 28 13:28 foo.out Didn't remove it. Hmmm. Let's see what bash does: D:\acl62\src\cl\src>bash bug2.sh xxx foo.out -rw-r--r-- 1 layer None 6 Jan 28 13:28 foo.out removing foo.out... ls: foo.out: No such file or directory Yep, worked. D:\acl62\src\cl\src>which sh /usr/bin/sh D:\acl62\src\cl\src>bash --version GNU bash, version 2.05b.0(8)-release (i686-pc-cygwin) Copyright (C) 2002 Free Software Foundation, Inc. D:\acl62\src\cl\src> Again, it _only_ happens when run from a cmd prompt. Can anyone reproduce this? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/