Quote:
Originally Posted by mSSM
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
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
c) How can you not quote your variables?
|
Yes - evil, indeed, though not exactly the point I wanted to make *g*
Cheers!