One line solution


#1

sed ‘s|\|x|g;s|/|\|g;s|x|/|g’ input