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 is the difference between scripting and coding?
How can you get the value of pi till a 100 decimal places?
What does egrep mean?
What language is bash?
How will you emulate wc –l using awk?
defination of mapfile in winrunner?
Explain about login shell?
What is bash shell command?
Explain about return code?
Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"
How do I save a powershell script?
I want to connect to a remote server and execute some commands, how can I achieve this?