From: Michael Orlitzky Date: Sun, 23 Oct 2016 23:22:04 +0000 (-0400) Subject: Use parameter expansion instead of the "dirname" command. X-Git-Url: https://gitweb.michael.orlitzky.com/?p=bash.d.git;a=commitdiff_plain;h=50b76eac1604450cd5e51dc8da683ea3319d9b2a Use parameter expansion instead of the "dirname" command. --- diff --git a/all b/all index d9b5df0..573055e 100644 --- a/all +++ b/all @@ -1,7 +1,7 @@ #!/bin/bash me="${BASH_SOURCE[0]}" -mydir=`dirname "${me}"` +mydir="${me%/*}" for script in "${mydir}"/*; do [ "${script}" == "$me" ] && continue