basename will remove trailing suffixes: mv $i $(basename $i .OK) this removes '.OK' from the end of filenames but nowhere else
bascule On Monday 13 Oct 2003 9:15 am, Brian Parish wrote: > for i in *.OK; do mv "$i" `echo $i | tr -d '.OK'`;done; > > removes the .OK just fine, but also removes ".", "O" and "K" wherever > they occur. -- "...[Arthur] leapt to his feet like an author hearing the phone ring..." -- Who says that the character of Arthur isn't autobiographical?
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com