Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: paragraph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: paragraph



On Nov 21, 2006, at 5:27 PM, Simon Brown wrote:
Date: Tue, 21 Nov 2006 12:33:25 +0100
From: Miguel Saro <email@hidden>
Subject: paragraph

set lesProcess to paragraphs of (do shell script "ps -Cx -o \"command\"")

All lignes are truncated to 79 characters, so I've tried set size of paragraph to 132, but this give me the error: "Can't set size of paragraph to 132"
How can I get this informations with no truncated lines?
Thank's for your help!

The problem your seeing isn't with AppleScript -- its with how the ps command works. Adding a -w will help, as with that option default terminal window size will be 132 instead of 80 columns. How to make it bigger? Afraid I don't know, but there must be some way to set the environment so ps thinks you're using a terminal wider than 132 columns.

You can give `ps` the -w flag twice; this will make it print lines as wide as necessary regardless of terminal size.


set lesProcess to paragraphs of (do shell script "ps -Cxww -o \"command\"")

—IWC

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


References: 
 >paragraph (From: Simon Brown <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.