What is use of "cut" command?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / suresh
Cut is used for column wise search of strings orto display
it.
Is This Answer Correct ? | 3 Yes | 1 No |
What are the four fundamental components of every file system on linux?
Explore about environment variables?
What is basename in shell script?
c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again
How does path variable work?
What is shell scripting used for?
Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?
Calculate a real number calculation directly from the terminal and not any shell script.
Explain about stdin, stdout and stderr?
How do you read arguments in a shell program - $1, $2 ..?
How to print all array elements and their respective indexes?
What is a batch file used for?