How can I convert underscore separated words to "camelCase"? Here is what I'm trying:
echo "remote_available_packages" | sed -r 's/([a-z]+)_([a-z])([a-z]+)/\1\U\2\L\3/'
But it returns remoteAvailable_packages
without changing the p
in packages
.
/g
"global" on the sub – thrig Jan 12 '18 at 19:35s
command leaving nothing to "repeat". Tryecho "remote_available_packages" | sed -r 's/([a-z]+)_([a-z])/\1\U\2/g'
– Nov 24 '18 at 22:49101_dalmations
? – G-Man Says 'Reinstate Monica' Nov 24 '18 at 23:01