Quote:
Originally Posted by
systemoper
Hi Gurus,
Somebody can say me how to delete blank spaces and blank lines in a file unix, please.
Thank you for advanced.
We do not seem to be getting anywhere with this thread. And, it is obvious that we have a language barrier.
We do not understand what you are trying to do. The term "blank spaces" is confusing. The standards define <space> characters, <blank> characters (which includes <space> and <horizontal-tab> characters), <blank lines> (which are lines that contain zero or more <blank>s and a line terminating <newline> character), and <empty lines> (which are lines that just contain the line terminating <newline> character).
In post #6 in this thread you said "
I need to back-spaces removed". But, <backspace> characters are not <blanks> and <backspace> characters do not appear on <blank lines>.
What are you trying to do?
- Do you want to remove every <space> character from a file?
- Do you want to remove every <horizontal-tab> character from a file?
- After removing every <space> and <horizontal-tab> character, do you want to remove every empty line from a file?
- Do you want to remove every <backspace> character from a file?
- Are there other characters you want to remove from a file?
How do you want to do it?
- Do you want to print a file to paper and cut these characters out with scissors?
- Do you want to make these changes using an interactive editor (such as vi)?
- Do you want to make these changes using a non-interactive editor (such as sed)?
- Do you want to make these changes using a tool in a pipeline (such as tr)?
Please give us some details about what you are trying to do so we can help you!