Quantcast
Channel: User Dennis Williamson - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 61

Answer by Dennis Williamson for How to scroll large datafile while keeping header

$
0
0

Try this (you'll need to install multitail):

multitail -du -t "$(head -n 1 filename)" filename

or, for headers longer than one line:

multitail -wh 2 -l "head -n 2 filename" filename

If you want to follow command output instead of a file:

multitail -wh 2 -l "command | head -n 2" -l command

or use -t as appropriate. Note that you may need to use unbuffer so your command output appears immediately.

You can use -D to disable the display of status lines for the -wh forms (it would defeat the purpose of the -t form).


Viewing all articles
Browse latest Browse all 61

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>