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 |
c program which accept one argument as a directory name and prints all the file name along with its inode number and total count of the file in directory
c program to display the information of given file similar to givan by the unix or linux command ls -l
What is a shell made of?
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
write a shell script that accepts name from user and creates a directory by the path name, then creates a text file in that directory and stores in it, the data accepted from user till STOP, displays the no. of characters stored in the file.Program stops if directory name is null
c program to check whether all the directories in the path exists has read and write permission
How can we find the process name from its process id?
What is the difference between a variable and value?
Where cron file kept?
What is the difference between a shell variable that is exported and the one that is not exported?
What is the way to do multilevel if-else's in shell scripting?
What is MUTEX?