Ask Your Question

Revision history [back]

The command below will tail follow tail -f a file and only print the first line without word wrapping

tail -f <FILENAME> | cut -c 1-$COLUMNS

Description

tail -f <FILENAME> Pretty Self Explanatory - tail follow

cut -c 1-X Cuts the first X characters of a line

$COLUMN The bash variable for the width of the terminal (the number of columns displayed)