#!/bin/bash path_value="path/to/value/src" service_name=$(echo "$path_value" | sed 's~path/to/\([^/]*\)/.*~\1~') echo "$service_name"
Standard input is empty
value
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!