#!/bin/bash
s='/word1 /word2 //word3'
sed -E 's~(/{2,})|/~\1~g' <<< "$s"