Timeline for Transform snake_case to camelCase with sed
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 3, 2023 at 17:20 | comment | added | nibot |
The vi command :s/_\([a-z]\)/\U\1/g fails to convert the first character of the variable name to upper case. (Edit: I guess that's what OP desired.)
|
|
Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
Nov 18, 2016 at 5:13 | comment | added | Wildcard |
@NicolasRaoul, gotcha! For scripted text edits, you may want to learn ex (the predecessor of vi ), which is designed for editing text files (whereas Sed is the stream editor)—and is fully portable. I've written extensively on its use on the Unix & Linux Stack Exchange.
|
|
Nov 18, 2016 at 4:49 | comment | added | Nicolas Raoul | Thanks! This is part of a code generation tool (with different modules using different languages with different conventions), so vi won't do, it needs to be automated. | |
Nov 18, 2016 at 4:05 | history | answered | Wildcard | CC BY-SA 3.0 |