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.

5
  • This looks good but I got foo Ubar foo Ubar. Commented Dec 9, 2014 at 10:48
  • Did you just miss backslash? Commented Dec 9, 2014 at 10:53
  • No, I copied and pasted: echo "foo-bar-foo-bar" | tr "-" " " | sed -e 's/\b./\U&/g' Commented Dec 9, 2014 at 10:56
  • I also copied and pasted the output from my terminal. I am using RHEL 6.5. Commented Dec 9, 2014 at 10:57
  • 1
    Apparently there are some differences between OSX and Linux: unix.stackexchange.com/questions/13711/… Commented Dec 9, 2014 at 10:59