Fwd: bash script bugs

Sergey Ivanov icegood1980@gmail.com
Thu Dec 3 01:20:00 GMT 2009


System config attached...


---------- Forwarded message ----------
From: Sergey Ivanov <icegood1980@gmail.com>
Date: 2009/12/3
Subject: bash script bugs
To: Cygwin <cygwin@cygwin.com>


Have a script:
#!/usr/bin/bash
f="$(ls $1)"
for v_file in "$f"; do
 echo $v_file
done
named FileGroupContentsChange.sh.

Twos things do not work as they should. By order:
1) Output in command line for nest commands
 ls /cygdrive/d/install/buf/*.html
 dir /cygdrive/d/install/buf/*.html
is same:
/cygdrive/d/install/buf/a.html
/cygdrive/d/install/buf/b.html

while output for ./FileGroupContentsChange.sh
/cygdrive/d/install/buf/*.html is only
/cygdrive/d/install/buf/a.html


2) (not critical but not "classical") Both command line script and
outputs for current folder in one line:
ls returns
FileGroupContentsChange.sh  cygcheck.out  sources
and so ./FileGroupContentsChange.sh do



-- 
King regards,
Sergey Ivanov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 131253 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091203/46e8ed07/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list