fork(1) download
  1. #!/bin/bash
  2. s="this_is_my_task() this_is_my____task() ___this_is_my_task() or tHhi_is_my task()"
  3. sed -E ':a; s/\b([a-z][A-Za-z]*)_([a-z]+(_[a-z]+)*\(\))/\1\u\2/; ta' <<< "$s"
  4. sed -E ':a; s/\b([[:lower:]][[:alpha:]]*)_([[:lower:]]+(_[[:lower:]]+)*\(\))/\1\u\2/; ta' <<< "$s"
Success #stdin #stdout 0s 4268KB
stdin
Standard input is empty
stdout
thisIsMyTask() this_is_my____task() ___this_is_my_task() or tHhi_is_my task()
thisIsMyTask() this_is_my____task() ___this_is_my_task() or tHhi_is_my task()