How Do You Cut Down the First Word in Linux?
Contents How Do I Cut a Word in Linux? to Cut by Character Use the -C Option. This Selects the Characters Given to the -C Option. This Can Be a List of Comma...
Contents
How do I cut a word in Linux?
To cut by character use the -c option. This selects the characters given to the -c option. This can be a list of comma separated numbers, a range of numbers or a single number. Where your input stream is character based -c can be a better option than selecting by bytes as often characters are more than one byte.
Must Read
How do you find the first word of a line in Unix?
To print a whole word, you want -f 1 , not -c 1 . And since the default field delimiter is TAB rather than SPACE, you need to use the -d option. What’s nice about this solution is it doesn’t read beyond the first line of the file.