Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of somian (5953)

Wednesday March 14, 2007
12:33 AM

The hell you sed

[ #32680 ]

Just to be perverse, I'll post my little cli sed program ... written to snag a couple much-liked fonts from the FONTS directory of one of my MS Windows machines, so I can use it on GNU/Linux.
ls -1 \ /cdv/c/winnt/fonts/{Min,Myr}*.[Tt][Tt][Ff] | sed -n '{s^\(.\+\)\.ttf$^\1^;h;s^ ^_^g;s:.\+/\([^/]\+\):./\1.ttf:;x;s:\n: :g;s: :\\ :g;s:$:.ttf:;G;s:\n: :g;p;s:.*::;h}' | xargs -L 1 install -vm 0664

Isn't that beautiful? ;-P