1

How to display from line 10 to line 23 in from passwd using tail?

I know that using tail -1/etc/passwd It will display last line from passwd

So please help.

Jorge Castro
  • 71,754
Ayman
  • 11

2 Answers2

1

You can combine the commands "head" and "tail" like so:

head -n23 filename | tail -n14
1

Like Squall5668 posted, you would have to use head and tail programs together. As an alternative, you may prefer to use sed as a single command, like this

sed -n '10,23p' filename