This may work
sed 's:/\(/\)\{0,1\}:\1:g'
سؤال
hi i would like to use SED (Unix environment)in order to alternatively:
as example consider the following string
I want to substitute // character with / character.
I would like //
to become /
and /
to become nothing. Therefore the final string will result as:
I want to substitute / character with character
المحلول
This may work
sed 's:/\(/\)\{0,1\}:\1:g'
نصائح أخرى
This should do:
sed -e 's: / : :g' -e 's: // : / :g' file
But not as good as 1_CR
s solution