Timeline for Bash for loop on all files in folder except one
Current License: CC BY-SA 4.0
        8 events
    
    | when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 29, 2019 at 23:48 | comment | added | xenoid | Fewer processes and shorter code. "Not everyone can be familiar...": yes, but everyone can/should learn a new trick from time to time otherwise we would still all be using the original sh. My skills improve because when I see some code I don't recognize, I try to understand where that comes from and if I can use it myself. | |
| Jan 29, 2019 at 18:27 | comment | added | ilkkachu | find folder/*.robot ...works but is a bit odd. You'd usually usefind . -name "*.robot" ! -name "config.robot" -exec ...Of course, the latter would recurse to subdirectories, and would not keep the filenames in numerical order, while the former does exactly the opposite... | |
| Jan 29, 2019 at 18:23 | comment | added | ilkkachu | @xenoid, efficient in what way? If you mean in terms of CPU time used, the difference is quite likely to be totally negligible. If you mean in terms of readability or such, do note that not everyone might be familiar with ksh-style extended globs, and they're not standard anyway, unlike the ifsolution | |
| Jan 29, 2019 at 18:14 | history | edited | ilkkachu | CC BY-SA 4.0 | 
                
                    added 27 characters in body 
                
             | 
| Jan 29, 2019 at 10:57 | comment | added | xenoid | Using extglob(as in @sparhawk comment) is more efficient... | |
| Jan 29, 2019 at 10:55 | history | edited | Siva | CC BY-SA 4.0 | 
                
                    deleted 1 character in body 
                
             | 
| Jan 29, 2019 at 10:45 | history | edited | Siva | CC BY-SA 4.0 | 
                
                    added 118 characters in body 
                
             | 
| Jan 29, 2019 at 10:36 | history | answered | Siva | CC BY-SA 4.0 |