read file with windows filenames
Matthias Meyer
matthias.meyer@gmx.li
Thu Jan 29 23:40:00 GMT 2009
Mark J. Reed wrote:
> For what it's worth, I've had intermittent problems with bash and
> while read loops where the loop aborts after one iteration whenever
> there's nontrivial code in the loop body, on multiple platforms, not
> just Cygwin. So this might not be a Cygwin issue. I've never been
> ble to isolate the problem enough to file a bug report, unfortunately.
Thanks to all.
The problem was a problem of this windows program attrib. /dev/null will
solve this problem. :-)
#!/bin/sh
while read -r cLine
do
echo $cLine
attrib ${cLine%%:*} "${cLine#*:}" < /dev/null
done < 2restore4
br
Matthias
--
Don't Panic
--
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