7 pointsby olexsmir6 hours ago1 comment
  • kevincox6 hours ago
    I am not a huge fan of most of these, but a few do seem useful.

        : "${1:?missing argument, aborting!}"
    
    I wouldn't use this because I would want to give $1 a name for the rest of the script, so I would assign. But it can be a nice way to give a clear error for missing required environment variables.

    Many of the others (like truncating files) are probably more clearly written with dedicated commands, but may come in useful if you are going to extreme lengths to avoid dependencies outside of the shell.