I have a line of text like:
value,value,,,value,value
I want two empty values ββto be replaced with another value. Sort of:
value,value,hello,hello,value,value
I am currently trying something like:
sed -e 's/^,/hello,/' -e 's/,$/,hello/' -e 's/,,/,hello,/g'
Specifies empty values ββat the beginning, at the end, and in the middle. BUT, it does not catch two consecutive empty values ββin a line. How to update regular expression patterns so that an undefined number of consecutive empty values ββis displayed in the middle?
source share