On Wed, 2003-10-15 at 01:54, Thomas Deutsch wrote:
> Brian Parish <[EMAIL PROTECTED]> schrieb:
> 
> > On Mon, 2003-10-13 at 23:00, bascule wrote:
> > > 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.
> > 
> > That's great, except that it seems that I need another scripting 101
> > lesson.
> > 
> > Based on the above I would have thought that:
> > 
> > #!/bin/bash
> > for i in *.OK; do mv $i $(basename $i .OK)
> > 
> > would do it, but I get:
> > 
> > line 3: syntax error: unexpected end of file
> > 
> > Do I have too many dollars or something (this has never been a problem
> > before ;-)
> 
> I think you must write "done" in a new line at the end.
> 
> Greetings from Switzerland
> 
> Thomas

Thanks Thomas,

Like I said - scripting 101!  Works like a charm now.

cheers
Brian


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to