Folks, it is time for some Linux commands.
Ok. Here is the one that I have used, to remove lot of spaces between words with a single space in a file.
For example the "MoreSpaces.txt file is having the following text.
So, once you execute the above command the output file "OneSpace.txt" will be created and it's contents will be like as given below.
Sweet isn't it ???
Ok. Here is the one that I have used, to remove lot of spaces between words with a single space in a file.
cat MoreSpaces.txt | tr -s ' ' ' ' > OneSpace.txt
For example the "MoreSpaces.txt file is having the following text.
"Hello This is having more spaces between words..."
So, once you execute the above command the output file "OneSpace.txt" will be created and it's contents will be like as given below.
"Hello This is having more spaces between words..."
Sweet isn't it ???