William Rowden rowdenw at eskimo.com
Mon May 22 21:14:21 PDT 2000

As long as we're suggesting interesting ways of doing this, here's

ls | sed 's/\(.*\)/\1 \1.png/' | xargs -n2 mv

This meets the original desire to use one line and pipes.

Today, A. Racine wrote:

> This one only fits your description if you allow for semicolons.


> $ mkdir /tmp/flarf ; cp * /tmp/flarf ; mv -f -b -S .png

> /tmp/flarf/* . ; rm -f *[^.png] ; rmdir /tmp/flarf ; rm -f png

I don't think those `mv` options are very portable to other *nixes,
PGP key: http://www.eskimo.com/~rowdenw/pgp/rowdenw.asc until 2000-08-01
Fingerprint: FB4B E2CD 25AF 95E5 ADBB DA28 379D 47DB 599E 0B1AA
Nice night for a walk, eh?

More information about the Linux mailing list