Sed question
Koh Choon Lin
2choonlin at gmail.com
Fri Sep 23 20:53:43 UTC 2011
Hi
> Can you help me with a sed command? I have a string as follows;
> FileVersion: 14.0.4756.1000
> And I want to remove everything before the 1, leaving;
> 14.0.4756.1000
> I thought that the following should do it but it doesn’t appear to work. Any
> ideas what I should be using?
> sed "/^FileVersion: */!d; s///;q"
> (This is using SED for windows, but as far as I can see the syntax is the
> same).
If you are writing a script, using other commands might be easier:
$ echo "FileVersion: 14.0.4756.1000" | tail -c +14
14.0.4756.1000
--
Regards
Koh Choon Lin
More information about the ubuntu-users
mailing list