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*

5
  • Hi Commander, thanks for your reply. I made some edits to point to my needs more specific. My apologies because i wasnt clear at the beginning. Commented Jun 28, 2014 at 20:03
  • +1, but, in your explanation, I suggest saying calling the 1st s argument regex (or some such thing) rather than string; also, there is no need for the g option. Commented Jun 28, 2014 at 20:05
  • @user3635042: Simply replacing user with .* in the sed command will do what you want. Commented Jun 28, 2014 at 20:07
  • No, I guess there isn't, hey? I have a bad habit of just typing the g any time I want to match more than one pattern... ;) And like @mklement0 says, it's trivial to make this match other strings than user - editing. Commented Jun 28, 2014 at 20:09
  • @mklement0 that solved it. Thank you very much :D Commander, thanks Commented Jun 28, 2014 at 20:13