Re: How to put numbers in front of selected lines?

2019-03-30 Thread Christopher Stone
On 03/28/2019, at 08:25, Rod Buchanan mailto:r...@kdsi.com>> wrote: > Or create a two-line shell script (name it "NumberLines.sh") and put it in > Library/Application Support/BBEdit/Text Filters > > #!/bin/sh > nl -ba -s '. ' Hey Folks, This method is problematic in that it produc

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Bill Kochman
Chris, you wrote: > #!/usr/bin/env bash > nl -nrz -w2 -s'. ‘ That works on all lines. What about if you have blank lines in the document? While it works fine on files that have continuous lines of text, the above indents two spaces and places a period on blank lines. Kind Regards, Bill Koch

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Christopher Stone
On 03/30/2019, at 02:35, Bill Kochman mailto:wordweaver...@gmail.com>> wrote: > Chris, you wrote: > > #!/usr/bin/env bash > nl -nrz -w2 -s'. ' > > That works on all lines. What about if you have blank lines in the document? > While it works fine on files that have continuous lines of text, the a

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Bill Kochman
Thanks Chris! The updated script works great! :) BTW, I tried to install GNU nl via Homebrew, but I was unable to locate it. In the Terminal, neither “nl” or “gnunl” worked. Likewise, I visited Homebrew’s formulae page on the web, and I couldn’t[’t locate it there either. I suspect that it ma

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Christopher Stone
On 03/30/2019, at 03:48, Bill Kochman mailto:wordweaver...@gmail.com>> wrote: > BTW, I tried to install GNU nl via Homebrew, but I was unable to locate it. > In the Terminal, neither “nl” or “gnunl” worked. Likewise, I visited > Homebrew’s formulae page on the web, and I couldn’t[’t locate it the

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Bill Kochman
Hello Chris, Ha! Yes, I in fact figured that out and installed coreutils just a bit ago. Thanks for your time! :) Bill Kochman Bill’s Bible Basics wordweaver...@gmail.com https://www.billkochman.com > On Mar 30, 2019, at 7:37 PM, Christopher Stone > wrote: > > On 03/30/2019, at 03:48, B

Re: How to put numbers in front of selected lines?

2019-03-30 Thread @lbutlr
On 30 Mar 2019, at 03:37, Christopher Stone wrote: > > `nl` is a part of coreutils. > > Here's a list of them: > https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands And, veering ever so slightly off topic, there is also findutils which gives you access to gnu find and locate and

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Bill Kochman
Ha! I took it a step further and installed coreutils, moreutils, findutils and a number of others, via Homebrew and MacPorts. Do you think I overdid it a bit? The way I figure, they take up so little space, I’d rather have them there for the rare occasion when someday some app may need one of t

Re: How to put numbers in front of selected lines?

2019-03-30 Thread @lbutlr
On 30 Mar 2019, at 05:37, Bill Kochman wrote: > > Ha! I took it a step further and installed coreutils, moreutils, findutils > and a number of others, via Homebrew and MacPorts. Both? I would pick one (Homebrew) and stick with it. I gave up MacPorts because it required a full install of Xcode

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Bill Kochman
Actually, Homebrew is my default go-to choice for Terminal-based installations. However, I figured that MacPorts probably needed an update — which it did — and so then I decided to try to find something with it, which I couldn’t find with Homebrew. As it turned out, what I was looking for — nl

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Christopher Stone
On 03/30/2019, at 06:48, @lbutlr mailto:krem...@kreme.com>> wrote: > osxutils looks interesting. Hey Lewis, Thanks for the reminder. I'd forgotten to install those critters. In general they're pretty edge-case commands, but they have their uses. -- Best Regards, Chris -- This is the BBEdit

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Christopher Stone
On 03/30/2019, at 06:53, Bill Kochman mailto:wordweaver...@gmail.com>> wrote: > Actually, Homebrew is my default go-to choice for Terminal-based > installations. However, I figured that MacPorts probably needed an update — > which it did — and so then I decided to try to find something with it, w

Re: How to put numbers in front of selected lines?

2019-03-30 Thread Bill Kochman
Well, Chris, as I said in my previous comment, I mainly use Homebrew for all Terminal installations. In fact, I hadn’t cracked open MacPorts in quite a while, but I figured I should at least update it. And, as I said, I couldn’t find “nl” with Homebrew, so I gave it a go with MacPorts. Same resu