I'm stuck in including regular expressions with a sed command.  Q: I want to replace all occurences of two spaces after the end of a sentence with just once space.  Here is what I did: sed 's/^ $/^$/' file  And it didn't substituted two spaces with a one space after the sentence ends.  Output I get: This is the output.  Hello HelloOutput I want: This is the output. Hello Hello
Replace all occurences of two spaces after the end of a sentence with just one space
text processing;sed
 sed 's/\.   */. /g' < filereplace dot followed by two or more spaces with dot followed by a single space.