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

write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?

6 Answers   IBM, Wipro,


What is a program shell?

0 Answers  


Please anyone suggest atleast 2 good training institutes in Hyderabad, INDIA where i can learn unix shell scripting.

1 Answers  


Write a shell program to test whether a given number is even or odd?

8 Answers  


Hi, i want to zip the files that generates automatically every few minutes (files generated are in .arc extension)....any body write a script for this... thanks in advance

5 Answers   HP,






What are filters explain sort with all the options available?

0 Answers  


what is the meaning of First line of shell script ,what is meaning of #! pleas explain brifly

4 Answers  


Explain how you Automate your application using Shell scripting.

0 Answers   MAHINDRA,


What is ms powershell?

0 Answers  


What is meant by dos operating system?

0 Answers  


When should shell programming/scripting not be used?

0 Answers  


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

0 Answers  


Categories