I need to convert a string like // /usr/lib/fax/logo.mie noff to espf[c]{/usr/lib/fax/logo.mie} i've gotten as far as - sed "s/^\/\/ /epsf[c]{/" - which replaces the // But I'm having a brain fart and can't come up with the reg exp to match up the remainder up to the first whitespace.