I would like to print the tail
of a file (could be also head
or cat
in general) to the screen but restrict the number of characters per line.
So if a file contains ...
abcdefg
abcd
abcde
abcdefgh
... and the maximum number is 5, then the following should be printed:
abcde
abcd
abcde
abcde
How would I do that?