[dev] looking for a sed script
Edwin Culp
eculp@encontacto.net
Sat, 20 Jul 2002 16:58:58 -0700
Quoting Jan Schneider <jan@horde.org>:
| A little bit off topic though needed for Horde:
|
| I need a sed script that removes all lines before and including the first
| empty line of the input. I never wrote sed scripts before so any help would
| be appreciated.
something like
sed '1,/^[ ]*$/d' file
^^^^^^^
There is a space and a tab in the [] just in case :-) it means
0 or more occurrences of any combinations of space/tabs.
or this
sed '1,/^$/d' file
should work but it does assume that there is a "blank" line because if
there isn't it doesn't print anything.
ed
|
| Jan.
|
| --
| http://www.horde.org - The Horde Project
| http://www.ammma.de - discover your knowledge
| http://www.tip4all.de - Deine private Tippgemeinschaft
|
| --
| Horde developers mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: dev-unsubscribe@lists.horde.org
--
-------------------------------------------------------------
http://worldinternet.org - Mergence of Business and Technology