Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: What one-liners do people actually use?

by jeffa (Bishop)
on Dec 08, 2005 at 19:40 UTC ( #515349=note: print w/replies, xml ) Need Help??

in reply to Re: What one-liners do people actually use?
in thread What one-liners do people actually use?

HERETIC!!! >:(

Just kidding! ;) I actually did pull off a BASH for loop:

for i in `ls *.mas`; do tidy -asxhtml -clean -i -wrap 200 $i > $; + done
And then a Perl one-liner to strip off the .new ... and then i realized that tidy as a -m option to modify the file in place!

UPDATE: Why Tanktalus? Because you weren't here at the time to show me a better way. :P Thanks for the tips, guys.


(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^3: What one-liners do people actually use?
by Tanktalus (Canon) on Dec 08, 2005 at 19:44 UTC

    Um ... why "ls *.mas" in backticks when you can eliminate the subprocess using just "*.mas"? ;-)

    Also, your renaming ... that's what /usr/bin/rename is for: "rename .mas .html *.mas" ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://515349]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-10-22 09:20 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (294 votes). Check out past polls.