X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:content-type:content-transfer-encoding; q=dns; s=default; b=F98
	IbU0gRV+YCih0SaExIyUPcfky9za9aL5DMiwuqGc1vYssVN81mf6/Fr0yjqoGzdJ
	kLCofggvFtszHiqnsnmOEoIE0EysYb7eV4c613aEjLfmbexBFswhErsO9zVyHtVF
	K1bSLyL1MX7cN2+PYoes/kNahNl3uMwkZjbgZYxM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:content-type:content-transfer-encoding; s=default; bh=FGU6ZIA/r
	BP9zsFqN4jGSY/lmyM=; b=aemmmqKfr6pVgkq+gZ45KWETHP/FZYAHqTbUQT4ss
	p2wpSSURzadCjxiOjyJ8wGNeOXkFALtePpPPS4RK0//su/nkq/GEFoiQJ4EbdAN8
	YxnPOOvw92SZrEXompIYQN2WqawMx6WUpfPoJpxhKedgBJ7pozMo3TdoUMftTy/l
	u4=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: smtp104.biz.mail.bf1.yahoo.com
X-Yahoo-SMTP: ycweUreswBCK.d0cygTP5tXwHncbOU7YVeVfIxOQoyRMI2IuIKLmUqE-
Message-ID: <5439C59F.5060308@molconn.com>
Date: Sat, 11 Oct 2014 20:04:47 -0400
From: LMH <lmh_users-groups@molconn.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: cygwin bash script suddenly can't find ls, grep
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hello,

I have been working on a bash script and suddenly I started getting an
error that ls could not be found,

./remove_rows.sh: line 27: ls: command not found

I can run ls from the command line just fine. There is also an ls
command before line 27 that runs fine. This is the part of the script
that is causing problems (line numbers are included).

24 PATH=$(ls -d './'$SET'/'$FOLD'/'$FOLD'_anneal/'$PARAM_SET'/'$AN_SET)
25 echo $PATH
26
27 FILE_LIST=($(ls $PATH'/'*'out.txt'))
28 echo ${FILE_LIST[@]}

The echo $PATH command gives the correct output, but I get the error on
line 27. I have tried without the double parentheses, which wouldn't
give the result I want,

FILE_LIST=$(ls $PATH'/'*'out.txt')

but this gives the same error.

After this problem happened, I updated cygwin and restarted, but the
issue persists. Is there something wrong with my cygwin install? If
there happens to be some problem with my bash, please let me know, but
this is pretty simple stuff and I just can't see why ls would be found
at line 24 but not line 27.

The test script worked many times before this error and I didn't change
that part of the script that is causing the error.

LMH

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

