Skip to main content
got truncated somehow
Source Link
Murray Jensen
  • 3.2k
  • 2
  • 13
  • 9

I avoid using the $() construct because it is not portable - in the real world. You have listed four shells - there are a lot more variations than that around (an order of magnitude?). Try running your script in Solaris /bin/sh and see how you go.

On the other hand, when do you stop supporting old systems? can you never progress to new ways of doing things? I reckon you should trust your own judgement, and if you can see a definite advantage of the new way over the old, then go for it ... this is not one of them (personally I find the bacticks much clearer - they cannot be confused with shshell variable substitution, which is a different thing)

I avoid using the $() construct because it is not portable - in the real world. You have listed four shells - there are a lot more variations than that around (an order of magnitude?). Try running your script in Solaris /bin/sh and see how you go.

On the other hand, when do you stop supporting old systems? can you never progress to new ways of doing things? I reckon you should trust your own judgement, and if you can see a definite advantage of the new way over the old, then go for it ... this is not one of them (personally I find the bacticks much clearer - they cannot be confused with sh

I avoid using the $() construct because it is not portable - in the real world. You have listed four shells - there are a lot more variations than that around (an order of magnitude?). Try running your script in Solaris /bin/sh and see how you go.

On the other hand, when do you stop supporting old systems? can you never progress to new ways of doing things? I reckon you should trust your own judgement, and if you can see a definite advantage of the new way over the old, then go for it ... this is not one of them (personally I find the bacticks much clearer - they cannot be confused with shell variable substitution, which is a different thing)

Source Link
Murray Jensen
  • 3.2k
  • 2
  • 13
  • 9

I avoid using the $() construct because it is not portable - in the real world. You have listed four shells - there are a lot more variations than that around (an order of magnitude?). Try running your script in Solaris /bin/sh and see how you go.

On the other hand, when do you stop supporting old systems? can you never progress to new ways of doing things? I reckon you should trust your own judgement, and if you can see a definite advantage of the new way over the old, then go for it ... this is not one of them (personally I find the bacticks much clearer - they cannot be confused with sh