Re: Help with a GREP task

2022-07-03 Thread David Brostoff
On Jul 3, 2022, at 3:17 PM, Rod Buchanan wrote: > > Don't enter the '$'. I was showing the shell prompt (in my case, the bash > shell). I probably should've left that out. No problem of course -- now it works great. (In case it matters, I am using Monterey, so the default is zsh.) Thank

Re: Help with a GREP task

2022-07-03 Thread David Brostoff
On Jul 3, 2022, at 1:26 PM, David Kelly wrote: > > As I originally stated, you now invoke the script file with > "awk -f script.awk " with a trailing space then drag your input file to the > command line to finish. > > -f tells awk to get its commands from the specified file rather than the

Re: Help with a GREP task

2022-07-03 Thread David Brostoff
On Jul 3, 2022, at 12:54 PM, Christopher Waterman wrote: > > It seems like you are missing some fundamentals when dealing with the command > line and paths and such. Yes, missing almost all the fundamentals (except for knowing how to create a POSIX style path), so thank you for the very clear

Re: Help with a GREP task

2022-07-03 Thread David Brostoff
On Jul 3, 2022, at 10:07 AM, Rod Buchanan 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: > >

Re: Help with a GREP task

2022-07-03 Thread David Brostoff
On Jul 3, 2022, at 7:26 AM, David Kelly wrote: > > Create an awk script file. Lets call it "script.awk" that looks like this: > > { > print $1 >> "col-1.txt" > print $2 >> "col-2.txt" > } Is creating an awk script file different from entering the above

Re: Help with a GREP task

2022-07-03 Thread David Brostoff
On Jul 3, 2022, at 12:07 AM, Chris wrote: > > >> On Jul 2, 2022, at 10:55 PM, David Brostoff wrote: >> >> }’ input.txt/Users/davidbrostoff/Desktop/Sample2010-2011.txt > > You need to replace ‘input.txt’ with the file you are dragging in > ‘/Users/davidbro

Re: Help with a GREP task

2022-07-02 Thread David Brostoff
On Jul 2, 2022, at 9:29 PM, David Kelly wrote: > > Type the command line and rather than type the input file name just drag the > file to the command line. Finder/Terminal will write the file's full path on > the command line. P.S. When I said the following line is repeated three times, I now

Re: Help with a GREP task

2022-07-02 Thread David Brostoff
On Jul 2, 2022, at 9:29 PM, David Kelly wrote: > > Type the command line and rather than type the input file name just drag the > file to the command line. Finder/Terminal will write the file's full path on > the command line. Thanks for the tip, but I must be doing something wrong. First I

Re: Help with a GREP task

2022-07-02 Thread David Brostoff
On Jun 29, 2022, at 8:49 PM, Christopher Waterman wrote: > > It breaks down like this: > > awk = The command; it takes two parameters. Param 1: The script. Param 2: A > Path to the source file. Again sorry for the beginner question, but what format should I use for the path if, for example,

Re: Help with a GREP task

2022-06-30 Thread David Brostoff
On Jun 30, 2022, at 5:47 AM, John E. Connerat wrote: > > Although this has been solved in numerous ways, there is one more solution > that might work if all the data are formatted with exactly three digits > followed by a space and two digits. It's something I use all the time with >

Re: Help with a GREP task

2022-06-30 Thread David Brostoff
On Jun 30, 2022, at 2:05 AM, Kaveh wrote: > > David, Extract is a great feature. Simple but clever. I use it all the time > for quickly analysing text I have scraped for example... Yes -- for the past couple of years I have only been using BBEdit in a very limited way and this was the first

Re: Help with a GREP task

2022-06-29 Thread David Brostoff
On Jun 29, 2022, at 8:52 PM, Christopher Waterman wrote: > > Well… No, no more steps. Mystery solved: I somehow had the Regex command highlighted in the Find box. As soon as I clicked elsewhere to dismiss the highlighting, the extracted text appeared in the new document. Thanks again -- I

Re: Help with a GREP task

2022-06-29 Thread David Brostoff
On Jun 29, 2022, at 8:52 PM, Christopher Waterman wrote: > > Well… No, no more steps. Is it because I am using BBEdit in free mode? David -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" rather

Re: Help with a GREP task

2022-06-29 Thread David Brostoff
On Jun 29, 2022, at 8:49 PM, Christopher Waterman wrote: > > Does that help? Yes, now I get it -- thank you. David -- 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.

Re: Help with a GREP task

2022-06-29 Thread David Brostoff
On Jun 29, 2022, at 7:43 PM, David Kelly 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

Re: Help with a GREP task

2022-06-29 Thread David Brostoff
On Jun 29, 2022, at 7:58 PM, Christopher Waterman wrote: > > It is pretty easy to do this with two finds with extract. > Extract opens the matches in a new document. > > Find: ^\d{3} > Then hit extract > > Find: \b\d{2}\b > Then hit extract again Thank you for the easy-to-follow instructions.

Re: Help with a GREP task

2022-06-29 Thread David Brostoff
On Jun 29, 2022, at 7:43 PM, David Kelly wrote: > > In terminal.app it would be something like this: > > awk ‘{ print $1 >> “col-1.txt” > print $2 >> “col-2.txt” }’ input.txt Thank you -- I haven't used awk before though so I will have to get up to speed. (I asked about GREP only because I

Help with a GREP task

2022-06-29 Thread David Brostoff
I have a list of numbers in this format: 123 56 789 01 How can I create two separate documents with 123 and 789 in one and 56 and 01 in the other? David -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email

Re: Easy way to open .html files in BBEdit vs. browser?

2018-10-23 Thread David Brostoff
On Oct 23, 2018, at 3:39 PM, David Brostoff wrote: > > I am very satisfied with the other solution you provided but I also have > LaunchBar and would like to understand how to use it for this. > > Could you explain a little more? Please ignore my question -- I now see how t

Re: Easy way to open .html files in BBEdit vs. browser?

2018-10-23 Thread David Brostoff
On Oct 23, 2018, at 5:16 AM, Roland Küffner wrote: > > If you find yourself throwing around files between different applications > very often, I'd highly recommend LaunchBar > (https://www.obdev.at/products/launchbar/index-de.html). It provides > something like piping in the terminal, only

Re: Easy way to open .html files in BBEdit vs. browser?

2018-10-22 Thread David Brostoff
On Oct 22, 2018, at 5:34 PM, Jean-Christophe Helary wrote: > > I have the same issue that I solved with a trivial bit of AppleScript Thank you for this suggestion and for the detailed instructions. I already solved this by using a keyboard shortcut with the "Open File in BBEdit" service, as

Re: Easy way to open .html files in BBEdit vs. browser?

2018-10-22 Thread David Brostoff
On Oct 22, 2018, at 2:33 PM, Roland Küffner wrote: > > if I’am not mistaken, BBEdit comes with a system wide Service called „Open > File in BBEdit“ (at least, I have it in my service collection). > > So, open macOS’ system preferences, goto Keyboard > Shortcuts. Find it in the > list and give

Easy way to open .html files in BBEdit vs. browser?

2018-10-22 Thread David Brostoff
Usually I want .html files to open in a web browser, but often I want them to open in BBEdit. Dragging files to the BBEdit icon in the Dock or using File > Open can get tedious though. Is there a way to make this easier, preferably via a keyboard shortcut? Thank you, David -- This is the

Re: Duplicate quotation marks

2018-02-03 Thread David Brostoff
On Feb 3, 2018, at 1:24 PM, Bucky Junior wrote: > > Look in Preferences —>Completion —>Insert matching delimiters while typing. > > Selected, it will double the double quotes, single quotes, parentheses, > square brackets, curly brackets, and who knows what else. Oh,

Duplicate quotation marks

2018-02-03 Thread David Brostoff
With BBEdit 12.0.2 (MacBook Pro 2017 15-inch, macOS 10.13.2, ABC - Extended keyboard in System Preferences), whenever I type a double quotation mark, two sets of double quotation marks are displayed. In other words, when I type ", the result is "", with the cursor placed between the two

Re: Swap compare panels?

2017-08-19 Thread David Brostoff
On Aug 19, 2017, at 1:38 PM, F. Alfredo Rego wrote: > > Perhaps Patrick and Rich might be inclined to consider placing > a “swap panes” button somewhere in the differences window itself > (if this is even feasible, and if this won’t break anything). I second the

Re: compare docx files?

2017-07-26 Thread David Brostoff
> On Jul 26, 2017, at 4:12 PM, Fletcher Sandbeck wrote: > > If you open the Find Differences window you can drag two documents from the > Finder into the rounded rectangle targets on the right. When I try that the .docx files are displayed as gibberish. (Maybe they have to

Preview advantages

2011-05-03 Thread David Brostoff
I have been happily using TextWrangler for a few years now. Most of what I do is fairly low-level work on HTML files that someone else has created. I recently tried the BBEdit free trial but didn't really see anything that I needed. Today, though, someone mentioned the preview feature, which

Re: Preview advantages

2011-05-03 Thread David Brostoff
At 1:23 PM -0700 5/3/11, Steve Piercy wrote: What is low-level? snip Preview may or may not be helpful in this situation. If you work in a web framework or use virtual URLs or edit an included file, then Preview does not help much. But if you edit a single HTML file and Preview it, Preview will

Re: Preview advantages

2011-05-03 Thread David Brostoff
At 3:09 PM -0700 5/3/11, Steve Piercy wrote: Also BBEdit is not a WYSIWYG editor, like Adobe Dreamweaver or the open source editors KompoZer or SeaMonkey. A WYSIWYG editor simulates what the web browser displays to a fair degree, although not exactly. Any of these may be more suitable to your