Re: How to print all lines of a file starting from line number X



fritz-bayer@xxxxxx <fritz-bayer@xxxxxx> wrote:
with which command can I print all lines after a certain line number. I
know that with head I can display the first X and with tail the last Y.
How do print all lines which start at a certain line until the last
line?

There are probably a thousand ways, but here's one.
If X is the number of the first line you want to see, then
sed -n X,$p filename

For example:

sadalsuud:~$ wc -l /usr/dict/words
38619 /usr/dict/words
sadalsuud:~$ sed -n -e 38617,\$p /usr/dict/words
zoom
zooms
zoos

Observe that you must escape the $ because it has special meaning to
the shell.

--
Oh to have a lodge in some vast wilderness. Where rumors of oppression
and deceit, of unsuccessful and successful wars may never reach me
anymore.
-- William Cowper
.



Relevant Pages

  • HELP for doubly linked list
    ... forward and one pointing backwards. ... You must be able to insert a new node at the head of the ... You must be able to insert a new node at the tail of the ... tail, F – display contents forward, B – display contents backwards, ...
    (microsoft.public.dotnet.languages.vc)
  • HELP for doubly linked list
    ... forward and one pointing backwards. ... You must be able to insert a new node at the head of the ... You must be able to insert a new node at the tail of the ... tail, F – display contents forward, B – display contents backwards, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: how to implement tail or head command ?
    ... >I am writing a mini shell and I want to implement the tail and head ... >"head" will display the 1st 10 lines of the file and tail will display ...
    (comp.programming)
  • how to implement tail or head command ?
    ... I am writing a mini shell and I want to implement the tail and head ... "head" will display the 1st 10 lines of the file and tail will display ...
    (comp.programming)
  • Re: Why pixel peeping (usually) makes no sense
    ... zoom, more realistically 50% zoom. ... Even these reduced zooms exaggerate the issue, since display pixels are ... Because screen pixels are so much larger and coarser than good printing ... Thus my normal practice is to assess images on screen at no more than ...
    (rec.photo.digital)