What is use of "cut" command?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I debug a shell script?

650


What is shell terminal?

627


write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?

3667


How do I edit a .sh file?

720


Can we run shell script in windows?

663






What will happen to my current process when I execute a command using exec?

617


Explain about non-login shell files?

798


How can we find the process name from its process id?

785


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

1787


What is shell and shell script?

647


What happens on a system call?

642


What does $$ mean in shell script?

683


What are the 3 standard streams in linux?

653


Where are cowrie shells found?

660


What does $1 mean in bash?

694