[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sed expression problem ?



David selby wrote:

I am starting to use sed but am having a problem with one expression in ...

cat /mnt/archive/fluxbox/keys | sed 's/:ExecCommand//g ;s/^Mod4 \(.\) Mod
4 \(.\)/WinKey \1\2/g'

works except I hoped s/\/[^ ]+\///g would match any /path/to/file/ and delete it. It refuses to match.

Idealy ...
/usr/local/mozilla/mozilla -edit -splash

would become
mozilla -edit -splash

Any ideas ?
Dave

PS these hyroglypics are starting to make some sense ....


Many thanks for all your input, I tried a * and it works ... apparently + won't work with sed.
Also your "how I would do its" are good to see, all a learning curve ...

Dave



Reply to: