|
From: Rene <re...@gr...> - 2002-07-13 20:33:23
|
Damn filenames... Filenames including newlines will not work properly. That much is sure. I'm going examine possible solutions, like use a NULL as an end-of-line seperator. I read somewhere that NULL's aren't accepted by shell programs like grep so that might be a problem. Maybe maybe an end-of-line marker like "///FF" would work if NULL is not usefull. What is your opinion about using flat text files instead of databases? Any suggestion on better ways to do it? Rene On Sat, 2002-07-13 at 18:11, Rene Rask wrote: > > I've finally been able to get some useful results. > > This is not a perfect solution as far as I can see. > > Basically it involves changing the $IFS value in bash to be a newline. > And changing it to the original value after use. > > The problem is (or will be) that filenames cannot contain newlines. > I might be able to escape newlines in filenames. > > Anyway. This solution is better than the old one so I'm going to update > the cvs with it. > > I'll see if I can test the newline problem and find a solution. > > > Rene > > > > Joe zacky wrote: > > Have you tried escaping single quotes like this, where $filename is the > > variable containing the name of the file: > > \'$filename\' > > > > Joe > > > > Rene Rask wrote: > > > >>The names are quoted. I've tried both double and single quoting. > >>If I can get bash to accept the names as "literal" instead of "glob" it > >>should solve the problem. > >> > >>A name like "some name^Mtest" does not behave well. > >>Only working solution I've found was this way: > >>$'some name^Mtest' > >>But I can't figure out how that is useful in a script. > >> > >> > >>I'll keep trying. > >> > >>-Rene > >> > >> > >>On Fri, 2002-07-12 at 07:26, Joe zacky wrote: > >> > >> > >>>Rene Rask wrote: > >>> > >>> > >>> > >>>>I've been looking into the filename problems. > >>>> > >>>>It seems to me that escaping filenames in PHP will ony lead to a > >>>>constant headache (which is not what I need right now ;) > >>>> > >>>>I've found a few Bash tricks that look really promising but I haven't > >>>>cracked the problem yet. I'm able to make Bash escape a filename with > >>>>weird characters in it. But I'm still not able to do it with input > >>>>from a list. > >>>>When (if?) I get this working we should be able to stop worrying about > >>>>filenames. > >>>>If you know any Bash experts please ask if they can help. > >>>> > >>>>-Rene > >>>> > >>>> > >>>> > >>>>------------------------------------------------------- > >>>>This sf.net email is sponsored by:ThinkGeek > >>>>Two, two, TWO treats in one. > >>>>http://thinkgeek.com/sf > >>>>_______________________________________________ > >>>>Bobs-devel mailing list > >>>>Bob...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/bobs-devel > >>>> > >>>> > >>>> > >>>Have you tried "quoting the filenames?" That also works in bash. > >>> > >>> > >>> > >>>------------------------------------------------------- > >>>This sf.net email is sponsored by:ThinkGeek > >>>Gadgets, caffeine, t-shirts, fun stuff. > >>>http://thinkgeek.com/sf > >>>_______________________________________________ > >>>Bobs-devel mailing list > >>>Bob...@li... > >>>https://lists.sourceforge.net/lists/listinfo/bobs-devel > >>> > >>> > >> > >> > >> > >> > >>------------------------------------------------------- > >>This sf.net email is sponsored by:ThinkGeek > >>Gadgets, caffeine, t-shirts, fun stuff. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>Bobs-devel mailing list > >>Bob...@li... > >>https://lists.sourceforge.net/lists/listinfo/bobs-devel > >> > >> > >> > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Bobs-devel mailing list > Bob...@li... > https://lists.sourceforge.net/lists/listinfo/bobs-devel |