Ubuntu – Rename command not found when running a script

bashrenamescripts

I'm trying to to execute a script, which uses the command rename.

When I execute it, I get a message rename: command not found. Any ideas?

if [[ -z '$3' ]]; then
    shopt -s dotglob
    rename "$EXPRESSION" ./*
else
    rename "$EXPRESSION" "$3"
fi

Best Answer

I just had to install the rename package.

sudo apt install rename
Related Question