-d’ ’ tells cut to use the space character as the column/field delimiter.

-f3-4 tells it to only return columns/fields 3 and 4.


>From the man page. (Type “man cut” in Terminal.app for complete info.)

cut -- cut out selected portions of each line of a file.  

SYNOPSIS
     cut -f list [-d delim] [-s] [file ...]

DESCRIPTION
     The cut utility cuts out selected portions of each line (as specified by 
list)
     from each file and writes them to the standard output.  If no file 
arguments are
     specified, or a file argument is a single dash (`-'), cut reads from the 
standard
     input.  The items specified by list can be in terms of column position or 
in
     terms of fields delimited by a special character.  Column numbering starts 
from
     1.

-d delim
             Use delim as the field delimiter character instead of the tab 
character.

-f list
             The list specifies fields, separated in the input by the field 
delimiter
             character (see the -d option.)  Output fields are separated by a 
single
             occurrence of the field delimiter character.

-- 
Rod

> On Oct 7, 2020, at 11:03 AM, Howard <[email protected]> wrote:
> 
> Rod,
> 
> What does the line below do?
> cut -d' ' -f3-4 
> 
> Howard
> 
> On Wednesday, 7 October 2020 at 10:11:31 am UTC-4 Rod Buchanan wrote:
> 
> Click Text -> Run Unix Command… , then run this:
> 
>       cut -d' ' -f3-4 | sort | uniq -c
> 
> When I copy/paste your data I get these results:
> 
>    2 Apple Jones
>    1 Banana Herb
>    4 Harvey Haney
>    2 Sam Blue
> 
> -- 
> Rod
> 
> 
> -- 
> Rod
> 
> 
>> On Oct 6, 2020, at 1:23 PM, Howard <[email protected] 
>> <applewebdata://AFE0D9DF-9AA7-4631-ADA5-5D1BC8365B30>> wrote:
>> 
> 
>> I have the following data (shown below). I want to count how many times each 
>> of the four names appear (Harvey Haney, Apple Jones, Banana Herb, Sam Blue). 
>> Can this be done in BBEdit? If not, I would appreciate suggestions on how it 
>> can be done.
>> 
>> 10:45:57      From Harvey Haney : Good morning. How is everyone today?
>> 10:46:08      From Apple Jones : I'm doing good. How are you?
>> 10:46:12      From Banana Herb : Good how are you!
>> 10:46:18      From Sam Blue : I'm doing fine. How are you?
>> 10:45:57      From Harvey Haney : Good morning. How is everyone today?
>> 10:46:08      From Harvey Haney : I'm doing good. How are you?
>> 10:46:12      From Apple Jones : Good how are you!
>> 10:46:18      From Sam Blue : I'm doing fine. How are you?
>> 10:45:57      From Harvey Haney : Good morning.
>> 
> 
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a feature 
>> request or need technical support, please email "[email protected] 
>> <applewebdata://AFE0D9DF-9AA7-4631-ADA5-5D1BC8365B30>" rather than posting 
>> here. Follow @bbedit on Twitter: <https://twitter.com/bbedit 
>> <https://twitter.com/bbedit>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <applewebdata://AFE0D9DF-9AA7-4631-ADA5-5D1BC8365B30>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/379b202c-463e-4d7c-8a26-af63ab83d0aan%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/bbedit/379b202c-463e-4d7c-8a26-af63ab83d0aan%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "[email protected]" 
> rather than posting here. Follow @bbedit on Twitter: 
> <https://twitter.com/bbedit <https://twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/83b7baf3-4b7a-4c49-8e5a-697b57795215n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/83b7baf3-4b7a-4c49-8e5a-697b57795215n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/9D5C7366-A252-44E3-B070-032C4A0813ED%40sofstats.com.

Reply via email to