One correction ... the second command s/b:

        $ cut -d ' ' -f2 source_file.txt > output_file_2.txt

As I sent it the second command will overwrite the file created by the first 
command.

Apologies for missing that.

-- 
Rod

> On Jul 3, 2022, at 2:35 PM, David Brostoff <[email protected]> wrote:
> 
> On Jul 3, 2022, at 10:07 AM, Rod Buchanan <[email protected]> wrote:
>> 
>> Another command-line option would be to use cut.  Assuming the fields are 
>> separated by a space:
>> 
>>      $ cut -d ' ' -f1 source_file.txt > output_file_1.txt
>>      $ cut -d ' ' -f2 source_file.txt > output_file_1.txt
>> 
>> Where:
>> 
>>      -d ‘ ‘                  Tells cut the fields are separated by a space
>>      -f 1                            Specifieds the field, in this case 
>> field 1
>>      source_file.txt         the name of the file containing the data
>>      output_file_1.txt       the name of the file you want the output placed 
>> in
> 
> Thank you for this interesting tip.
> 
> I now know how to specify the output path by dragging the output file to the 
> command line when the item it is replacing is the last one in the command, 
> but how do I do it for an item in the middle of the command?
> 
> Also, when I entered the above text in Terminal to try it out, I got the 
> error message "zsh: command not found: $". 
> 
> David
> 
> -- 
> 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/C5AD7034-128B-4D1E-BF65-971A06CE6861%40earthlink.net.



-- 
Rod

-- 
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/AB182DF6-A361-4EEF-BB3C-4983AD9D3F4E%40sofstats.com.

Reply via email to