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

Re: [PATCH] Add test cases for git-am

From
Andreas Ericsson <ae@op5.se>
Date
Jun 2, 2008, 17:53 UTC
Message-ID
<484433A2.7080600@op5.se>
In-Reply-To
<20080531220723.GD5907@leksak.fem-net>
Stephan Beyer wrote:
Show 11 quoted lines
> Hi,
> 
>> "git grep 'tail.*+' -- '*.sh'" says that this will the first and only
>> instance of "tail -n +<number>".  The syntax may be POSIX but not all
>> /usr/bin/tail unfortunately knows about it.
>>
>> I tend to prefer "sed -n -e '3,$p'" for things like this for portability.
> 
> I'm fine with that, but I sometimes wonder if systems that do not like
> "tail -n +3" really tend to like a "sed -n -e '3,$p'" :)
> 

I have yet to come across a sed which doesn't support -n, the range specifier and the p command, so yes, "sed -n -e '3,$p'" is very portable indeed.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C Hamano
Message 10 of 10 in “Add test cases for git-am”
  1. Add test cases for git-amStephan Beyer, May 30, 2008
  2. Junio C HamanoMay 30, 2008
  3. Stephan BeyerMay 31, 2008
  4. Mutt and Mail-Followup-ToTeemu Likonen, May 31, 2008
  5. Junio C HamanoMay 31, 2008
  6. Stephan BeyerMay 31, 2008
  7. 1/2 Add test cases for git-amStephan Beyer, May 31, 2008
  8. 2/2 Merge t4150-am-subdir.sh and t4151-am.sh into t4150-am.shStephan Beyer, May 31, 2008
  9. Junio C HamanoMay 31, 2008
  10. Andreas EricssonJun 2, 2008

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.