• 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: shell equivalent to text 1 thru -9?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell equivalent to text 1 thru -9?


  • Subject: Re: shell equivalent to text 1 thru -9?
  • From: Adam Wuellner <email@hidden>
  • Date: Mon, 18 Apr 2005 13:46:29 -0500

On 4/18/05, Jake Pietrykowski <email@hidden> wrote:
> Hi,
>
> This isn't a AS question, but rather I'm looking for an example of a shell
> equivalent to the AS command text 1 thru -9?
>
>    set x to "nameOfSomeApp_log.txt"
>    set y to text 1 thru -9 of x
>
> I want to return 'nameOfSomeApp'?

Hopefully this qualifies:

akw ~ $ ruby -e 'puts "nameofsomeapp_log.txt"[0..-9]'
nameofsomeapp

--
Adam
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >shell equivalent to text 1 thru -9? (From: Jake Pietrykowski <email@hidden>)

  • Prev by Date: Re: How to Renew DHCP Lease
  • Next by Date: Re: How to Renew DHCP Lease
  • Previous by thread: shell equivalent to text 1 thru -9?
  • Next by thread: Re: shell equivalent to text 1 thru -9?
  • Index(es):
    • Date
    • Thread