On Jun 29, 2022, at 10:22 PM, David Brostoff <dav...@earthlink.net> wrote:
> On Jun 29, 2022, at 7:43 PM, David Kelly <dke...@hiwaay.net> wrote: >> >> In terminal.app it would be something like this: >> >> awk ‘{ print $1 >> “col-1.txt” >> print $2 >> “col-2.txt” }’ input.txt > > As I mentioned, I am completely ignorant of awk, so sorry for the basic > question, but how do I get Terminal to point to the source document? (Sorry for being late to the party, just back from a road trip). 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 If the fields are separated by TAB, place the cursor between the '' (make sure there is no space) and type Ctrl-V, then TAB. -- Rod -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/B4253361-28F7-4EA9-AB4F-B62E207B5B5A%40sofstats.com.