Simplicity is better than complexity.
Simplicity is better than complexity.
Posted Mar 26, 2009 2:29 UTC (Thu) by k8to (guest, #15413)In reply to: Simplicity is better than complexity. by k8to
Parent article: Wheeler: Fixing Unix/Linux/POSIX Filenames
As evidence for my position, here are some real-world filenames that my software needed to create to correctly archive some digital music history of the personal computer as an instrument.
jrodman@calufrax:/opt/kmods/mods/artists/Karl> ls d_* ¦* d_ .it d_ .it d_ .it d_ .it d_1151.it d_1152.it d_1153.it d_1154.it ¦¦¦¦¯¯Ì_.it jrodman@calufrax:/opt/kmods/mods/artists/Karl> ls d_* ¦* |xxd 0000000: 645f 2020 2020 2e69 740a 645f 2020 202e d_ .it.d_ . 0000010: 6974 0a64 5f20 202e 6974 0a64 5f20 2e69 it.d_ .it.d_ .i 0000020: 740a 645f 3131 3531 2e69 740a 645f 3131 t.d_1151.it.d_11 0000030: 3532 2e69 740a 645f 3131 3533 2e69 740a 52.it.d_1153.it. 0000040: 645f 3131 3534 2e69 740a a6a6 a6a6 afaf d_1154.it....... 0000050: cc5f 2e69 740a ._.it.
These files are handled by a combination of python and shellscripts, and one piece of C code (wrapping a library which knew how to read certain binary formats.) All of these pieces can handle newlines, tabs, spaces, control characters, leading dahes, and so on. I'm not really that smart. It wasn't much work. If shellscripts are 5 second hackjobs, then they will always fail in some cases: strange filenames, permissions problems, etc. If you take a few minutes to apply correct safeguards, then thigns work fine.
