fork download
  1. #!/bin/bash
  2. s="* XYZ-1234/a-string-of-words-separated-by-dashes"
  3. awk -F'/' '/^[*] /{m=$1;n=$2;gsub(/^[*] /, "", m); gsub(/-/, " ", n); print m": "toupper(substr(n,1,1)) substr(n, 2)}' <<< "$s"
Success #stdin #stdout 0s 23456KB
stdin
Standard input is empty
stdout
XYZ-1234: A string of words separated by dashes