Re: [PATCH] Use POSIX standardized options for head(1) and tail(1)

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Michael Forney <mforney@xxxxxxxxxxx> writes:

> Indeed, that's what motivated the patch. The version of tail on my
> system does not support the legacy options.

I suspected as much. Which system are you using?

> Another possibility is `sed 2q`, which works for any number. It's even
> mentioned in the rationale section as a way to simulate head(1).

Yes, "sed 2q" should also work fine on all versions of sed I have ever
used.

> >    tail +3 == tail -n +3 == sed '1,2d'

This may also be written as "sed -n '3,$p'" if you want to just print
the lines you want rather than deleting the lines you do not want.

> I think this script is only necessary to rebuild the .depend file,
> which is not usually necessary, but you make a good point. I didn't
> realize that some implementations did not support the -n option. The
> change you suggested sounds good to me.

Most of those systems that do not support POSIX head and tail are very
ancient... I just no longer recall which ones they were... It has been a
long time since I have seen one, but I would rather not see it break if
there is a way to be compatible for all other systems.

	Be safe, stay healthy,
	-- Mark
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux