Replace All
Easy · Variables & Expansion · Parameter expansion
Problem
$CSV holds red,green,blue.
Print it with every comma replaced by a space, then print the length of the original string.
Examples
Input: CSV=red,green,blue Output: red green blue 14
Approaches
- // and ${#}
Related problems
Start free on Cariara · Coding problems · System design studio