Text ProcessingLesson 20Free preview
Bash Remove Section (cut)
This lesson is part of Bash · All levels
Summary
The cut command takes a portion of each line of text based on a column or character. With -d you set the column separator and -f you choose the column that you take. Cut works simple and fast, suitable for regular data such as separating semicolon or tabs.
Key points
- d determines the column separator as colon
- f select the column number, can be added as 1.3
- c cut based on character position
- Less suitable for data with a comma inside the quotation marks
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.