• 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: Determining item number matching "x" in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining item number matching "x" in a list


  • Subject: Re: Determining item number matching "x" in a list
  • From: Paul Skinner <email@hidden>
  • Date: Fri, 14 Mar 2003 11:03:49 -0500

Thanks for always having the Perl solution handy! Can you modify this so that I can pass it a term and a list? I could roll around and languish in my Perl ineptitude for a day or so and figure it out. Maybe.
Perhaps a document based script isn't a bad thing anyway.

Paul Skinner

On Friday, March 14, 2003, at 10:36 AM, John Delacour wrote:

do shell script "perl -e '
$f = qq~/tmp/junk.txt~ ;
open F, qq~>$f~ ;
for (1..32000) {
$_ = 33 + int rand(223) ; print F chr() .$/ }'"
do shell script "perl -e '
$f = qq~/tmp/junk.txt~ ; open F, qq~$f~ ;
for (<F>) {
$i++ ;
/a/ and print qq~$i$/~ }'"
_______________________________________________
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.

References: 
 >Re: Determining item number matching "x" in a list (From: John Delacour <email@hidden>)

  • Prev by Date: Re: POSIX file weirdness
  • Next by Date: Re: Determining item number matching "x" in a list
  • Previous by thread: Re: Determining item number matching "x" in a list
  • Next by thread: Re: Determining item number matching "x" in a list
  • Index(es):
    • Date
    • Thread