git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH Cogito] Make use of external editor work like CVS

From
Sean <seanlkml@sympatico.ca>
Date
May 8, 2005, 21:46 UTC
Message-ID
<2293.10.10.10.24.1115588808.squirrel@linux1>
In-Reply-To
<1115584015.8949.43.camel@pegasus>
On Sun, May 8, 2005 4:26 pm, Marcel Holtmann said:
Show 6 quoted lines
> /*
>  * Remove empty lines from the beginning and end.
>  *
>  * Turn multiple consecutive empty lines into just one
>  * empty line.
>  */
sed ' 1{:a;s/^[ \t]*$//;T;N;s/\n//;ta}
      /^[ \t]*$/{:b;$d;N;s/\n[ \t]*$//;tb}'  filename
There's probably shorter... but it's mothers day.. time to go!

Cheers, Sean

Previous: Petr BaudisNext: Marcel Holtmann
Message 19 of 20 in “Make use of external editor work like CVS”
  1. Make use of external editor work like CVSMarcel Holtmann, May 8, 2005
  2. SeanMay 8, 2005
  3. Petr BaudisMay 8, 2005
  4. Marcel HoltmannMay 8, 2005
  5. Petr BaudisMay 8, 2005
  6. Marcel HoltmannMay 8, 2005
  7. Petr BaudisMay 8, 2005
  8. Marcel HoltmannMay 8, 2005
  9. Petr BaudisMay 8, 2005
  10. Marcel HoltmannMay 8, 2005
  11. Petr BaudisMay 8, 2005
  12. Marcel HoltmannMay 8, 2005
  13. Petr BaudisMay 8, 2005
  14. Marcel HoltmannMay 8, 2005
  15. Petr BaudisMay 8, 2005
  16. Marcel HoltmannMay 8, 2005
  17. Edgar ToernigMay 9, 2005
  18. Petr BaudisMay 9, 2005
  19. SeanMay 8, 2005
  20. Marcel HoltmannMay 8, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.