1
I'm fairly inexperienced with *nix scripting, and I have a need to take a string with lowercase words separated by dashes and convert that to a new string with the dashes removed, and the first letter after each original dash uppercased. For example, I want to take
one-two-three-four-five
and convert it to
oneTwoThreeFourFive
The solution must be able to handle multiple dashes (including none), and can use other *nix utilities if necessary like sed, awk, etc.
What do you mean be "including none" - that would just be the original word... onetwo-three would be onetwoThree – Kinnectus – 2016-06-22T11:23:57.797
@BigChris I think OP simply means that the proposed solution cannot assume that any dashes are present at all, and must gracefully handle that case. – a CVn – 2016-06-22T11:28:38.060
@MichaelKjörling And split the words for him? Gee, I'll pass on this one. – MariusMatutiae – 2016-06-22T13:11:38.727
@MichaelKjörling - That's correct. If I were to pass in the string 'baseball' the solution must return that untouched ... – TheIcemanCometh – 2016-06-22T16:10:13.497