4 ms·
Please don't ever assume you can avoid spaces and quotes. It's just a time bomb. It's like people saying you don't need to escape SQL values because they come
by viraptor 6y ago
Please don't ever assume you can avoid spaces and quotes. It's just a time bomb.
It's like people saying you don't need to escape SQL values because they come from constants. Yes, they do... today.
It's not just quoting either. It's setting the separator value and reverting it correctly. It's making sure you're still correct when you're in a function in an undefined state. It's a lot of overhead in larger projects.
- CountSessine 6y agoSure, but in a larger project your won’t be coding in shell script, right?
- viraptor 6y agoLarger projects will often include small shell scripts for deployment / maintenance / various tasks.
- coliveira 6y agoWhat I am saying is nothing new. This has always been the policy of UNIX developers. If you use only file names without space, then you can make it easier to use tools that depend on this. Of course, if you're writing applications in shell then you cannot rely just on convention.