[ale] Problems w/ mv and sed

Jordi S. Bunster j.bunster at earthlink.net
Mon Dec 23 23:21:50 EST 2002


On Mon, 2002-12-23 at 19:21, Stephen Touset wrote: 

> I've been busy getting some music on gtk-gnutella, and it evidently
> renamed files to $(FILENAME).OK if it's good after completion, or
> $(FILENAME).BAD if it's corrupted.
> Which seems to be as it should. Anyone know what might be causing this?
Not really. But this one should do: 

for file in *.OK; do mv "$file" "`echo $file | cut -d. -f1-3`" ; done 

Pay attention though, the -f1-3 is because you have three .'s (dots) in
the filename. Adjust accordingly, or write a better script. :P 

> Stephen Touset
-- Jordi 


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list