From: Earnie B. <ea...@us...> - 2005-04-17 06:04:55
|
On 7:13:18 pm 2005-04-16 "smiley" <mem...@fa...> wrote: > Oki - I didn't know that ppl overhere dissliked sf forums, no prob > that's why I joined the mail list to get some answer on this :). > We do like the SF forums that is why they are there. Greg, doesn't like to use them. The forums provide a means for posting to the list without the need to join them. Greg, please be tollerant of the Forums and don't discourage their use. I really appreciate the help you give and dislike having to say anything like this. As for why no one answered, perhaps we just haven't gotten around to reading the mail yet. > I didn't post the script and example because I wanted to spare time, > since I already described in details and posted scripts overthere. I > just checked the link I posted in previous mail it opened without > problems overhere. > I'll check out the posting and will respond to it if I need to. > However here is the minimal example: > > The problem is "-d" & "-f" flags works, but incorrect. Some files I > have are recognized correctly, but some files are not. Sometimes > catalogs are recognized as ordinary files, sometimes files are > recognized as catalogs. Sometimes files are skipped all along. > > Here is dos "dir" command output of one catalog I used for tests: > 2005-03-16 23:30 <KAT> . > 2005-03-16 23:30 <KAT> .. > 2005-03-05 01:40 <KAT> album > 2005-03-03 16:20 2ÿ161 Animation.java > 2005-03-03 16:20 114 cp.java > 2005-03-17 00:20 0 DIR.LOG > 2005-03-03 16:20 1ÿ358 FrameTest.java > 2005-03-03 16:20 1ÿ576 Game.java > 2005-03-03 16:20 299 ImageFrame.java > 2005-03-03 16:20 418 ImageTest.java > 2005-03-16 21:00 0 log.txt > 2005-03-03 16:20 1ÿ005 rls.java > 2005-03-03 16:20 3ÿ552 ScreenManager.java > 2005-03-03 16:20 870 Sprite.java > 2005-03-16 20:59 <KAT> t1 > 2005-03-03 16:56 <KAT> test3 > 2005-03-03 16:20 385 WindowCloser.java > 12 fil(er) 11ÿ738 byte > 5 katalog(er) 76ÿ784ÿ787ÿ456 byte ledigt > > And here is the bash script that I used: > ----------------------------------------- > #!/bin/sh > > dir=$1 > > for file in $(ls $dir) > do > if [ -d "$file" ] > then > echo $file - KAT > else > echo $file - FILE > fi > done > ----------------------------------------- > The result I get: > > Animation.java - FILE > DIR.LOG - FILE > FrameTest.java - FILE > Game.java - FILE > ImageFrame.java - FILE > ImageTest.java - FILE > ScreenManager.java - FILE > Sprite.java - FILE > WindowCloser.java - FILE > album - KAT > cp.java - FILE > list.txt - FILE > log.txt - FILE > rls.java - FILE > t1 - FILE > test2 - FILE > test3 - FILE > > As you see some directories are recognized as files, for example > test3. > > If you can check the sourceforge link with my post, there are more > details and 2 other modifications of bash script above and test > results. I don't know what can be problem. Is it a bug? Have I > missunderstood something or is this really a bug? > Maybe, checking your script against my file system tree. Your dir listing above the script didn't contain a test2 file or directory. Did you create that prior to running your test script? Earnie -- MinGW - http://www.mingw.org/ Wiki - http://www.mingw.org/MinGWiki/ Bug Report - http://sourceforge.net/tracker/?group_id=2435&atid=102435 Submit Patch - http://sourceforge.net/tracker/?group_id=2435&atid=302435 SF Project - http://sourceforge.net/projects/mingw Job Listing - http://sf.net/people/viewjob.php?group_id=2435&job_id=21643 |