read file with windows filenames

2009-01-29 Thread Matthias Meyer
Hi, I want to read filenames from a file and manipulate this files with the windows program "attrib". Not easy to find how to read windows filenames from a file without lost of "\". while IFS= read -r cLine do echo "$cLine" done < restoreFiles.tmp The above will work. BUT: while IFS= re

Re: read file with windows filenames

2009-01-29 Thread Tim McDaniel
On Thu, 29 Jan 2009, Matthias Meyer wrote: while IFS= read -r cLine do echo "$cLine" attrib +H "$cLine" done < restoreFiles.tmp rm -f restoreFiles.tmp will stop the while loop after the first call of attrib: + echo 'C:\Dokumente und Einstellungen\Administrator\Anwendungsdaten\Mic

Re: read file with windows filenames

2009-01-29 Thread Matthias Meyer
Tim McDaniel wrote: > Given that the debug output has "attrib +S" but the code at top has > "attrib +H", and that the debug output has "test 0 -gt 0" that the > code doesn't have just before the loop exit, it is probably necessary > for you to publish the actual code that's failing, even if it has

Re: read file with windows filenames

2009-01-29 Thread Mark J. Reed
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 e

Re: read file with windows filenames

2009-01-29 Thread Matthias Meyer
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