Решение, использующее только оболочку:
filename=foo-bar-baz
while read -rd-; do
newname="${newname:+$newname-}$REPLY"
done <<< "$filename"
mv "$filename" "$newname"
Это работает, потому что имя файла не заканчивается тире, поэтому последний токен игнорируется.
Это поведение Unity (witch is mess) может быть изменено из командной строки, откройте терминал и введите:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 0
Чтобы восстановить значение по умолчанию:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 1
Это поведение Unity (witch is mess) может быть изменено из командной строки, откройте терминал и введите:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 0
Чтобы восстановить значение по умолчанию:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 1
Это поведение Unity (witch is mess) может быть изменено из командной строки, откройте терминал и введите:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 0
Чтобы восстановить значение по умолчанию:
dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 1