cut -c1-10 file.txt

Category: Text Processing

cut -c1-10 file.txt

Extract characters 1 through 10 from each line

Extracts characters 1 through 10 from every line, by character position rather than by delimiter.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.