"ls" finds file1 but "ls file1" does not

Charles D. Russell worwor@bellsouth.net
Tue May 10 15:54:00 GMT 2005


Eric Blake wrote:

What version of coreutils are you using?  Attach the output of `cygcheck 
-svr' as described in cygwin.com/problems.html, then consider upgrading. 
__________________
I am attaching cygcheck in case you can find something obvious. 
However,I am reluctant to upgrade because the use of large static 
fortran arrays with cygwin/g77 seems to be a fragile issue and my 
current installation is now working (but only with -mno-cygwin).
++++++++++++++++
On further reflection, this is not a problem I can safely ignore, since 
I use cygwin scripts for my backup routines.  I tried rebooting and 
chkdsk to no avail, then tried to reproduce the problem, and found that 
I can reproduce it with the following script. (Which in fact I used 
before, but forgot about.)  It is a newly written script, thus a likely 
suspect for the newly encountered problem.

Sorry about appending cygcheck.out as well as attaching it.  Must have 
hit a wrong button.

#! /usr/bin/sh
# rename_lc.sh
# rename - change filenames to lower case (to restore after MS unzip)
# for all files in default directory
echo rename to lower case
echo for all files in default directory
echo operating on directory $PWD

#    trial run for approval
for f in ` ls `
do
  echo "$f" " ` echo $f | tr A-Z a-z ` "
done

#    approve
echo type y to proceed
read PROCEED
echo $PROCEED
if test $PROCEED != y
then
        exit 0
fi

#    execute
for f in ` ls `
do
  echo renaming $f
  mv -v "$f" " ` echo $f | tr A-Z a-z ` "
done


--
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/



More information about the Cygwin mailing list