Re: Newbie question: delete newline character with sed
Xicheng Jia wrote:
> hzmo...@hotmail.com wrote:
>>>sed '/^[ \t]*$/d' does not work
>>Sorry guys, I just found out that
>>1. I probably missed the space inside the square brackets, and
>>2. I did not know I need to type a Ctrl-v before typing a real tab in
>>order for the shell to recognize the tab character
>>Now it works.
>>Further, sed 's/[ ]*$//'
>>where there is a space and a tab character between the [ and the ]
>>removes trailing spaces from each line.
>>How can I combine these two sed commands so that both empty lines and
>>trailing spaces (and tabs) are removed? Thanks.
>
> Just connect them with a simicolon:
^^^^^^^^^
An ape's digestive tract? That must be messy.
John
--
use Perl;
program
fulfillment
|