eolas/zk/Truncate_stdout_with_cut.md

318 B

tags
Linux
procedural

Truncate stdout with cut

Pass in -c to truncate characters or -b to truncate bytes.

Return the first three characters of "Thomas":

echo 'thomas' | cut -c -3
# tho

Return "Thomas" minus the first three chracters:

echo 'thomas' | cut -c 3-
# omas