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

Re: Solaris sed

From
Collin Funk <collin.funk1@gmail.com>
Date
Jun 12, 2025, 03:42 UTC
Message-ID
<87bjqteicd.fsf@gmail.com>
In-Reply-To
<09f954b8-d9c3-418f-ad4b-9cb9b063f4ae@comstyle.com>
Hi Brad,
Brad Smith <brad@comstyle.com> writes:
Show 16 quoted lines
> Building on Solaris I noticed the following two issues with Solaris sed.
>
>     GEN version-def.h
> sed: Missing newline at end of file standard input.
>
>     GEN config-list.h
> sed: illegal option -- E
> Usage:  sed [-n] script [file...]
>         sed [-n] [-e script]...[-f script_file]...[file...]
>
>
> https://github.com/git/git/commit/e1b81f54da80267edee2cb8fd0d0f75f03023019
>
> The second issue being introduced fairly recently. Not sure what would be
> appropriate fixes. Just pointing them out if someone has an suggestions for
> fixes.

I noticed these as well, but just ignored them since it seems to build fine.

The first one seems like just a warning? Probably something to do with POSIX defining a "Text File" as "A file that contains characters organized into zero or more lines" where a line is "A sequence of zero or more non- <newline> characters plus a terminating <newline> character."

The second is more tricky. The '-E' option to use EREs was not added to the specification for 'sed' until POSIX.1-2024 [1]. Maybe the script could check for the 'gsed' command? All of the (few) Solaris machines I use will have many GNU programs installed like that.

Collin
[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sed.html
Previous: Brad SmithNext: Brad Smith
Message 2 of 15 in “Solaris sed”
  1. Brad SmithJun 12, 2025
  2. Collin FunkJun 12, 2025
  3. Brad SmithJun 12, 2025
  4. Eli SchwartzJun 12, 2025
  5. Collin FunkJun 12, 2025
  6. Brad SmithJun 12, 2025
  7. Junio C HamanoJun 12, 2025
  8. Brad SmithJun 12, 2025
  9. Collin FunkJun 12, 2025
  10. Jean-Noël AVILAJun 13, 2025
  11. Eric SunshineJun 13, 2025
  12. Collin FunkJun 13, 2025
  13. Eric SunshineJun 12, 2025
  14. Paul SmithJun 12, 2025
  15. Eric SunshineJun 12, 2025

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.