Selecting Last X Lines of Shell Script Result
Selecting Last X Lines of Shell Script Result
- Subject: Selecting Last X Lines of Shell Script Result
- From: Marconi <email@hidden>
- Date: Mon, 26 May 2008 13:01:12 -0700
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
(No, this is not an actual use I have for this functionality. The
shell scripts are mostly home grown and would not exist on your
systems so I used the 'ls' example so you'd see a result on your
systems, if you choose to run it.)
The problem is that some of the scripts I run this way return a lot
of 'progress' lines as they work and I just want to be able to
display the last X lines in the dialog.
When executing a shell script, how do I set the my_Message variable
to just the last X lines of the output?
--
"A man who believes in nothing will fall for anything." -- Malcolm X
_______________________________________________
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