I want to get the first 20 or so characters from a number of files.
I've seen examples using cut but they all seem to get the first 20 characters of each line in the file, while I only want the first characters in the file itself (ie. from the first line), nothing more.
Is there a simple way to do this?
-c
switch inhead
assumes 1 byte = 1 character. – Thomas N Feb 20 '17 at 18:20-c
option is a non-portable extension. – kdhp Feb 20 '17 at 18:22cat
(or evencut
) be the tool used. OP simply noted that they had seen examples usingcut
. – bballdave025 Jan 09 '20 at 16:11