Fun with zmv
How come I’ve never used zmv before?
$ touch "I have spaces" $ l total 0 -rw-r--r-- 1 igen322 mkpasswd 0 Dec 21 15:16 I have spaces $ autoload -U zmv $ zmv '* *' '$f:gs/ /_' $ l total 0 -rw-r--r-- 1 igen322 mkpasswd 0 Dec 21 15:16 I_have_spaces $ touch Iis.pl $ zmv -W '*.pl' '*.txt' $ l total 0 -rw-r--r-- 1 igen322 mkpasswd 0 Dec 21 15:16 I_have_spaces -rw-r--r-- 1 igen322 mkpasswd 0 Dec 21 15:18 Iis.txt