Since Blogger is displaying this test file without the extra spaces, please take my word for it.
# cat filename
This is a test. We will delete the extra spaces.
This can be accomplished with the UNIX tr utility.
# cat filename | tr -s ' ' ' '
This is a test. We will delete the extra spaces.
This can be accomplished with the UNIX tr utility.
Output to newfilename
# cat filename | tr -s ' ' ' ' > newfilename
View newfilename contents
# more newfilename
This is a test. We will delete the extra spaces.
This can be accomplished with the UNIX tr utility.
Per a reader's request, here's a picture similar to the aforementioned without Blogger compressing the spaces.
3 comments:
Hi...
I tried this one but not working.
Can you better take a screen shot the shell screen and put in blog.
Regards
Anjali
anjali,
That's a good idea and no problem.
Roy
try
# cat -vte filename
which will show you all the extra spaces with a $
Rodney
Post a Comment