[LINK] literacy (not computer literacy) and GUIs
Fri, 16 Nov 2001 08:29:57 +1100
On Thu, Nov 15, 2001 at 10:17:53AM -0700, Alastair Rankine wrote:
> James Polley wrote:
> >Rename *.bat *.bak
> >Try *that* in a gui.
> An interesting exercise. Let's try it using bash.
> ls *.bat | sed -e "s/[\\\"$]/\\\&/g" -e "s/\(.*\)\.bat$/mv
> \"\1.bat\" \"\1.bak\"/" | sh
mmv '*.bat' '#1.bak'
note, that's the 'mmv' command, not 'mv'. see man page for details.
there are other easy ways of doing it if you don't have mmv installed.
hint: see the man page for 'basename'.
> I'm constantly amazed at how poorly common CLI tools perform at their
> bread-and-butter tasks like this one.
it's a poor craftsman who blames his tools.
craig sanders <firstname.lastname@example.org>
Fabricati Diem, PVNC.
-- motto of the Ankh-Morpork City Watch