Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    You do not need to use [ ]* to match just spaces, a simple ` *` would do. Of course [ \t]* would probably be better, to catch tabs, too. Commented Apr 8, 2014 at 9:23
  • This is just a bit more complex than the solution with awk, but I choose it, because you understood that /new/name is a dummy name and will actually be a variable, and you provided a solution with that in mind. Commented Apr 8, 2014 at 9:47