#!/bin/bashs='/word1 /word2 //word3'sed -E 's~(/{2,})|/~\1~g' <<< "$s"
Standard input is empty
word1 word2 //word3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!