On 07/18/2017 09:53 PM, SF Markus Elfring wrote: >> why should a simple `basename` or ${name##*/} hurt the performance? > > Such data deletion causes also corresponding processing costs, doesn't it? > Would it be nicer to avoid them if the initial input data could be provided > as “basenames” already?
Sorry, it seems I missed the most important question: What is your exact use case? We need numbers and commands to reproduce it. Otherwise, this is all just guesswork, and we could spend years to discuss what could maybe be considered, etc. You already got the ideal answer for probably 99.9% of the cases - "use find(1)" - so unless you describe your outstanding edge case in more detail, I'm afraid there's nothing more we could help you with. Have a nice day, Berny