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?