Hi Peter,

> I think I have got it the hard way.  Now to repeat 12 times.
>
> $ rename -v 's/01 - //' *.ogg
> 01 - Charlie Parker - All the Things You Are.ogg renamed as Charlie Parker - 
> All the Things You Are.ogg
> 01 - John Coltrane - Blue Train (live).ogg renamed as John Coltrane - Blue 
> Train (live).ogg
> 01 - Miles Davis - Half Nelson.ogg renamed as Miles Davis - Half Nelson.ogg
> 01 - Thelonious Monk - Blue Monk (live).ogg renamed as Thelonious Monk - Blue 
> Monk (live).ogg

    rename -v 's/^\d+ - //' *.ogg

    s    substitute
    /    start regular-expression search pattern
    \d   a digit
    +    one or more times
    ␣-␣  space, dash, space to be matched literally
    /    separate search pattern from the replacement
    /    end the replacement, i.e. replace with nothing

I like Monk's ’Round midnight.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2026-02-03 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
  New thread, don't hijack:  mailto:[email protected]

Reply via email to