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

Re: [PATCH] tail -n not supported in all OSs

From
Theodore Tso <tytso@mit.edu>
Date
Oct 16, 2007, 22:06 UTC
Message-ID
<20071016220624.GC1314@closure.lan>
In-Reply-To
<1192553837-18302-1-git-send-email-jari.aalto@cante.net>
On Tue, Oct 16, 2007 at 07:57:14PM +0300, Jari Aalto wrote:
Show 9 quoted lines
> 
> SunOS/Solaris tail(1) does not support option '-n'. The
> following patches change occurrances of:
> 
>    tail -n <N>
> 
> to
> 
>    tail <N>

POSIX.2 guarantees that "tail -n 2" works. "Tail -<N>" is considered obsolete. Unfortunately Solaris requires you to use /usr/xpg4/bin/tail if you want a POSIX.2 compliant header file. The /usr/bin/tail is designed for System V R3 compliance (i.e., from a full two decades ago; SVR3 was released in 1987), and is due to Sun's vow to Backwards Compatible Forever.

See "man 5 standards" on a Solaris box to see how your PATH variable has to be set if you want something which is compatible with modern Unix/Linux common usage.

					- Ted
Previous: Florian Weimer
Message 10 of 10 in “tail -n not supported in all OSs”
  1. tail -n not supported in all OSsJari Aalto, Oct 16, 2007
  2. git-am.sh: Remove option -n from tailJari Aalto, Oct 16, 2007
  3. git-commit.sh: Remove option -n from tailJari Aalto, Oct 16, 2007
  4. git-rebase--interactive.sh: Remove option -n from tailJari Aalto, Oct 16, 2007
  5. Johannes SchindelinOct 16, 2007
  6. David BrownOct 16, 2007
  7. YOSHIFUJI Hideaki / 吉藤英明Oct 16, 2007
  8. Johannes SchindelinOct 16, 2007
  9. Florian WeimerOct 16, 2007
  10. Theodore TsoOct 16, 2007

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.