View Single Post
Old 04-24-2012, 02:49 AM   #42
kodomo
M92 info archivist
kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.kodomo is no ebook tyro.
 
Posts: 238
Karma: 1398
Join Date: Jun 2008
Device: IRex Iliad 2nd ed., Onyx Boox M92, Onyx Boox Max Lumi
Quote:
Originally Posted by mSSM View Post
Apart from the fact that they don't seem to have a clue how to use the Linux file system - the coding style is horrible.

a) Why would you 'grep' the output of 'df' when you can just pass it the path to the file system directly?
You possibly would, if you were unsure whether the FS is mounted (or where) and you don't want to get the info about the wrong FS (but they obviously don't consider this in this place, or they would have at least quoted their variable, and written an if-statement :P)
Quote:
Originally Posted by mSSM View Post
b) Why would you _still_ use backticks for command substitution? That is just terrible, terrible style! Somebody tell them to use $() instead.
*cough* *lol* folks who started scripting a _long_ time ago still do.
I have to admit that I'm amongst those who never bothered finding out the subtle difference between the two... backticks work, as long as you're not trying to use them inside a backtick environment... so why not use them?
...same for [
Quote:
Originally Posted by mSSM View Post
c) How can you not quote your variables?
Yes - evil, indeed, though not exactly the point I wanted to make *g*

Cheers!
kodomo is offline   Reply With Quote