One of the examples on the [front page][1], ``` file=$(echo `basename "$file"`) ``` is a [useless use of echo][2], and could be rewritten as ``` file=$(basename "$file") ``` or, just using [parameter expansion][3] in POSIX shell, without the need for an external program: ``` file=${file#*/}; file=${file%.*} ``` [1]: https://github.com/idank/explainshell/blob/master/explainshell/web/templates/index.html#L29 [2]: https://porkmail.org/era/unix/award.html#echo [3]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
One of the examples on the front page,
is a useless use of echo, and could be rewritten as
or, just using parameter expansion in POSIX shell, without the need for an external program: