• 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: Selecting Last X Lines of Shell Script Result
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selecting Last X Lines of Shell Script Result


  • Subject: Re: Selecting Last X Lines of Shell Script Result
  • From: Craig Williams <email@hidden>
  • Date: Mon, 26 May 2008 14:12:19 -0600


On May 26, 2008, at 2:01 PM, Marconi wrote:

I have a number of applescripts that just run a shell script. Typically, I get the result like this:

set my_Message to (do shell script "ls -l /Applications")
display dialog my_Message



set x to do shell script "ls -l ~/Desktop | tail -2"

Pipe it to "tail"

The above will only give the last 2 items in the list.

Regards,

Craig
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Selecting Last X Lines of Shell Script Result (From: Marconi <email@hidden>)

  • Prev by Date: Selecting Last X Lines of Shell Script Result
  • Next by Date: Re: Selecting Last X Lines of Shell Script Result
  • Previous by thread: Selecting Last X Lines of Shell Script Result
  • Next by thread: Re: Selecting Last X Lines of Shell Script Result
  • Index(es):
    • Date
    • Thread