News for hackers. Stuff that matters.
Re:Pure Bash Bible by lervag on Thursday September 19, 2019 @04:36AM (#21014429)
I think the idea is that the `:` builtin allows expansion of arguments without actually doing anything else. However, the temporary variable $_ is filled with the content of the expression. That is, after the first

    : "${1#"${1%%[![:space:]]*}"}"
The $_ temporary variable contains the result of removing the leading spaces. In the next line, the spaces at the end are removed from the temporary variable with the "${_%..." syntax.

You can test this in your own shell by e.g. doing:

    : $PATH
    echo $_

There are no comments on this comment yet.