#!/bin/bashs='feature/test-111-test-test'url=$(awk -F'-' '{gsub(/\//, "-", $1);print $1"-"$2"-"}' <<< "$s")echo "$url"# => feature-test-111-
Standard input is empty
feature-test-111-
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!