[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Harry Potter Learns a Spell



Oops! Sorry about that Tom. 

Does this mean I have to turn in my magic wand?

Mike



Tom Droege wrote:
> 
> Harry asked the great wizard Mike Sallman "How can I change my bias files
> to dark?"
> 
> The wizard answered:  "perl -p -i -e 's/bias/dark/g'
> /whatever/directory/*.fits"
> 
> Moving to the right directory Harry fearlessly typed:
> 
> perl -p -i -e 's/bias/dark/g' *.fits
> 
> A small "pop" was heard, and Harry took out his DS9 wand and saw that the
> change was successful.
> 
> Harry noticed that the options spell "pie" so he went to the fridge and cut
> himself a piece.
> 
> Flushed with success, Harry moved to the flat file directory and typed:
> 
> perl -p -i -e "s/flat/object/g' *.fits
> 
> A dull thud was heard.  DS9 could no longer read the .fits files.
> 
> Donning his global edit protection cloak, Harry typed:
> 
> perl -p -i -e "s/object/flat/g' *.fits
> 
> Wonder of wonders, everything was back to normal.
> 
> Now Harry tried:
> 
> perl -p -i -e "s/flat   /object  /g' *.fits
> 
> A pleasant pop revealed that the correct change had been made, and the
> files were now all labeled 'object   '
> 
> OK, I think it was Arthur Clarke who said "A sufficiently advanced
> civilization is indistinguishable from magic."  This looks like magic to me.
> 
> BTW, what is to keep flat in the above from matching up with noise and
> changing some of the data bits?  Does the above somehow know to just look
> at the ascii text?
> 
> Tom Droege