Cut Command in Linux

 Cut Command in Linux

Cut Command
  • This linux command is used to display or cut the specific column(s) or range of columns from the input text file.
Syntax
cut -c<number> filename

Example
cut -c5 g1.txt

Here, 5th column will be cut and displayed in the terminal.

Options
-c1,5 -> cut only column1 and 5.
-c1-5 -> cut columns from 1 to 5.

Example 1 - Cut Specific Column (Cut 3rd Column from file f1)















Example 2 - Cut Specific Columns (Cut 3rd and 6th Column from file f1)














Example 3 - Cut range of Columns (Cut 3rd and 6th Column from file f1)















Video Demo









Comments

Popular posts from this blog

Sum of Two Numbers in Java using Swing GUI

God Murugan: Wallpapers, Wishes, Quotes in tamil

Vivo T4 5g - Specifications and Price in India, Review