fork(1) download
  1. #!/bin/bash
  2. s='feature/test-111-test-test'
  3. url=$(awk -F'-' '{gsub(/\//, "-", $1);print $1"-"$2"-"}' <<< "$s")
  4. echo "$url"
  5. # => feature-test-111-
Success #stdin #stdout 0.01s 5508KB
stdin
Standard input is empty
stdout
feature-test-111-