Afficher un message
Vieux 27/08/2006, 00h55   #2
hzmonte@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Newbie question: delete newline character with sed

> 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.

  Réponse avec citation
 
Page generated in 0,05451 seconds with 9 queries