[SOLVED] Having trouble showing more output.
Posted: Sun 04 Apr 2010, 05:39
Hello fellow forum members, is there a way in shell script to show a certain line of output with printf?
Example:
# fortune
Once the game is over,
the king and the pawn
go in the same box.
--whoever
How would I show 'go in the same box', instead of just the first line?
and
How do I show all the output?
I know how you get the last line (or first), and/or the last lines up (or the first lines down), using:
<command> | head -2
or
<command> | tail -2
Thanks!
Example:
# fortune
Once the game is over,
the king and the pawn
go in the same box.
--whoever
How would I show 'go in the same box', instead of just the first line?
and
How do I show all the output?
I know how you get the last line (or first), and/or the last lines up (or the first lines down), using:
<command> | head -2
or
<command> | tail -2
Thanks!