Skip to main content
code formatting
Source Link
muru
  • 78.1k
  • 16
  • 213
  • 319

If foo is important, then it should be configured in the script. This I think is good practice, because you then EXPLICITLY peg it to the script. I do not like indirection, implicit or hidden stuff ... scripts should be very simple if they are to be deployed.

Otherwise if you insist on finding it, then it can be found by doing

whereisfoo="$(which foo)"

whereisfoo="$(which foo)"

If this is not enough, then I fear what you may be doing is too complex.


 

If foo is important, then it should be configured in the script. This I think is good practice, because you then EXPLICITLY peg it to the script. I do not like indirection, implicit or hidden stuff ... scripts should be very simple if they are to be deployed.

Otherwise if you insist on finding it, then it can be found by doing

whereisfoo="$(which foo)"

If this is not enough, then I fear what you may be doing is too complex.


 

If foo is important, then it should be configured in the script. This I think is good practice, because you then EXPLICITLY peg it to the script. I do not like indirection, implicit or hidden stuff ... scripts should be very simple if they are to be deployed.

Otherwise if you insist on finding it, then it can be found by doing

whereisfoo="$(which foo)"

If this is not enough, then I fear what you may be doing is too complex.

Source Link
Xofo
  • 729
  • 1
  • 9
  • 22

If foo is important, then it should be configured in the script. This I think is good practice, because you then EXPLICITLY peg it to the script. I do not like indirection, implicit or hidden stuff ... scripts should be very simple if they are to be deployed.

Otherwise if you insist on finding it, then it can be found by doing

whereisfoo="$(which foo)"

If this is not enough, then I fear what you may be doing is too complex.