What is use of "cut" command?

Answers were Sorted based on User's Feedback



What is use of "cut" command?..

Answer / seshadri sethi

Cut - Utility used to cut/Strip out the required data/text
from the source.

Cut can be used in three modes,

Stripping by Character

cut -c 1-3

Striping by Byte length

cut -b -1-72

Stripping by delimiter and fields.

cut -d “|” -f1

Where

-d “|” -> Delimiter used in input text to separate columns

-f1 -> Field/Column number

While processing huge input files, Cut’s performance is far
better than awk

Is This Answer Correct ?    8 Yes 1 No

What is use of "cut" command?..

Answer / swaroopa

cut is used to get a specific data from a file. Supppose
you want to get a data in a file from column 10 to 20, you
can get it by using cut

eg: cat filename.txt | cut -c 10-20
eg: cut -c10-20 <filename.txt>

Is This Answer Correct ?    4 Yes 1 No

What is use of "cut" command?..

Answer / suresh

Cut is used for column wise search of strings orto display
it.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Shell Script Interview Questions

What is wc in shell script?

0 Answers  


How do I run a powershell script?

0 Answers  


What does chmod do?

0 Answers  


is this growing field and what is average package in this?

0 Answers  


c program to check whether all the directories in the path exists has read and write permission

1 Answers  






Why is a script important?

0 Answers  


Is scripting and coding the same thing?

0 Answers  


How to pass an argument to a script?

0 Answers  


How to debug the problems encountered in the shell script/program?

0 Answers  


How does ls command work?

0 Answers  


Is cmd a shell?

0 Answers  


What is the first line of a shell script called?

0 Answers  


Categories