cut command

The cut command, which extracts columns from each line, either by character position or by fields split on a delimiter.

In more detail

cut -d, -f2 takes the second comma-separated field; the default delimiter is a tab. It cannot treat several spaces as one separator, so use awk for columns aligned with runs of spaces.

Examples

cut -d' ' -f4 access.log
cut -c1-4
cut -d= -f2 release.txt

Related terms

Taught in

References

Certification courses