diff --git a/divorce_your_linux_admin.rst b/divorce_your_linux_admin.rst index 06e2777..8fee30c 100644 --- a/divorce_your_linux_admin.rst +++ b/divorce_your_linux_admin.rst @@ -117,26 +117,25 @@ big bozo. Not the fun kind with a red nose and big shoes either. The *only* hardwired path that's OK is ``/bin/sh`` on a shebang line. But if you do things - like this:: + like this: - #!/usr/bin/python + ``#!/usr/bin/python`` You should be sent to work 1st level phone support on the midnight shift in Somalia until you learn better. Grrrrrr. - This is the right way to do this is:: + This is the right way to do this is: - #!/usr/bin/env python + ``#!/usr/bin/env python`` ``env`` can reliably be found there and it will "discover" where ``python`` happens to actually be installed on that machine, so long as it is in $PATH somewhere. Similarly, - learn to use constructs like:: + learn to use constructs like: - SED=`which sed` - $SED something - DATE=`which date` - DATE=${DATE:-"/bin/date" + ``DATE=$(which date)`` + + ``DATE=${DATE:-/bin/date}`` In short, **NEVER make assumptions where things are**. Always discover it at configuration time. @@ -181,7 +180,7 @@ directory location under which it was built*. This lends itself nicely to automated deploys via tools like ``tsshbatch`` - or ``ansible`. You build a master tarball of your "standard" tools + or ``ansible``. You build a master tarball of your "standard" tools tree and then use automated deployment to put it everywhere.