bash limits ?

Peter L. Peres plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Sat Sep 11 03:30:32 UTC 2004


On Fri, 10 Sep 2004, Lennart Sorensen wrote:

> On Fri, Sep 10, 2004 at 05:52:55PM -0400, Peter L. Peres wrote:
>> Maybe I did not make myself clear: I do not get an error, some filenames
>> simply get eaten is $SORTED is long enough. They are in $SORTED (I
>> checked) but after I submit $SORTED to for ... they are gone. I will have
>> to check again. Maybe I'm just wasting time and should go directly for a
>> Perl solution.
>
> Does any of the filenames contain spaces?  Your current solution would
> die on spaces for sure.

No spaces in there.

>> It should but it will get more complicated later, I will want to prune
>> certain filenames (intersect with a list and keep what is not in it). It
>> will probably be done in Perl later, I just tinker with the ideas for now.
>> I would like to know what's broken ?
>
> Perl may be simpler to start with then.  Something like: find ... |
> perl, with perl eating filenames from stdin one per line would probably
> be better.

Yes, it is going there. I tried to do it in shell because it looked short 
and straightforward (famous last words). In the for ... loop I call an 
external application for each file. I don't know whether Perl will like 
this more than bash. I will do some timing tests to find out. I do not 
need the program to be fast and I very much prefer it to be terse since it 
will change a lot.

Peter
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list