• 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: Regex on OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regex on OS X


  • Subject: Re: Regex on OS X
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Thu, 3 Oct 2002 20:27:38 +1000

On Wednesday, October 2, 2002, at 12:39 PM, Malcolm Fitzgerald wrote:

I'm running a standard install of Jaguar. The only thing I can see in /Library/Perl/ is a folder called Darwin.


Then many people pointed to System/Library/Perl/ and Simon Forster said:

FWIW, this works for me (Mac OS 10.2.1):

But I ran foul of privileges, bog standard users aren't allowed to play in the system folder. I modified the script, at the end of the do shell script line I appended :

with administrator privileges

then I logged out, logged in as admin, gave my standard login identity Admin privileges, logged out, logged in as "not a bog standard user" (now with admin priveleges!) and ran the script. It does work a charm. It is set out below:


-- thanks to John Delacour for putting in the hard yards
-- thanks to Simon Forster for the path mods
--
set browser to "Opera" -- the name of your browser
set pods to "" & (path to startup disk) & "System:Library:Perl:Pods:"
set ls to list folder pods
set ppt to "Choose a pod"
choose from list ls with prompt ppt default items "perlreftut.pod"
set choice to result as string
set AppleScript's text item delimiters to {"."}
set pod to first text item of choice
set AppleScript's text item delimiters to {""}
do shell script "pod2html /System/Library/Perl/pods/" & pod & ".pod" with administrator privileges
set htmlText to result as string
set tmp to (path to temporary items) as string
set f to tmp & pod & ".html"
try
close access file f
end try
open for access file f with write permission
set eof file f to 0
write htmlText to file f
close access file f
tell application browser
open {alias f}
activate
end tell


--
--
Malcolm Fitzgerald email@hidden
Database Manager http://www.asauthors.org
The Australian Society of Authors ph: 02 93180877 fax: 02 93180530
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Regex on OS X
      • From: John Delacour <email@hidden>
  • Prev by Date: photoshop 7 eps save problems
  • Next by Date: Xpress template to document
  • Previous by thread: Re: Regex on OS X
  • Next by thread: Re: Regex on OS X
  • Index(es):
    • Date
    • Thread