• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scripting bbedit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting bbedit


  • Subject: Re: scripting bbedit
  • From: Christian Smith <email@hidden>
  • Date: Wed, 27 Jun 2001 08:22:50 -0400

"Arthur Cormack" <email@hidden> wrote:

> What is the smartest way to search a big text file an occurance of
> specific word and return the number of the line that that word occurs on?
> Is BBEdit the tool to use?

BBEdit is certainly one of the tools one can use for this.

> Does anyone know if there is a command in BBEdit's scripting commands that
> would return this line number?

The "find" command returns what you need. Here is a sample script:

tell application "BBEdit 6.1"
set s_results to find "BBEdit" searching in text of window 1
if found of s_results then
get startLine of found object of s_results
end if
end tell

--
Christian Smith | email@hidden | http://web.barebones.com
PGP Fingerprint - 60E5 2216 97D2 1D1A B923 F036 00A9 CEC0 D411 FA89


  • Prev by Date: Re: Help using dialog.
  • Next by Date: Re: How do I change my default editor?
  • Previous by thread: Re: scripting bbedit
  • Next by thread: Re: scripting bbedit
  • Index(es):
    • Date
    • Thread