I want to replace a string outputted from grep, I have:
$ npm info webpack | grep version
it outputs me
$ version: '2.1.0-beta.12',
but I want to have:
$ 2.1.0-beta.12
So I think I might achieve that using sed and replace unnecessary substrings. But here goes the hard part for me:
$ npm info webpack | grep version: | sed s/version: /
sed: -e expression #1, char 10: unterminated `s' command
How can achieve my goal?
-Eoption obviously means to use ERE syntax, but my GNU sed 4.2.2 manual only mentions-r.-Eworks, though! – Law29 Aug 02 '16 at 08:11-Eis an undocumented synonym for-r. The rumor is that POSIX has settled on-E, which BSD/OSX already uses, and, if that is added to the final standard, we will all be transitioning to-E. – John1024 Aug 02 '16 at 08:13