bash

Stupid bash trick of the day

function _globdo { local arg="$1" local dir=$(dirname $arg) local base=$(basename $arg) shift find $dir -name $base -exec "$@" {} \; set +f } alias globdo='set -f; _globdo' The function/alias combo is get around automatic...
bash

Using braces in bash

Another great bash tip from Deadman.org | Advancing in the Bash shell: Everyone has done one of the following to make a quick backup of a file: $ cp filename filename-old $ cp filename-old filename These seem fairly...