This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] tail -1 usage


> The new gnu coreutils do not allow tail/head -1 anymore.

Then use sed -n '$p', or sed '$!d' if you prefer.

It would be very nice to replace all occurrences of head and tail with sed invocations
(not something that I can do on a 56k line alas).

head -N ==>  sed Nq
tail -1 ==> sed $!d
tail -2 ==> sed $!N; $!D
tail -N ==> rewrite it otherwise :-)

|_  _  _ __
|_)(_)| ),'
------- '---


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]