Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: Run, RunThrough on OSX?


Because (I presume) the original inquiry from m. r. schaferkotter just 
used "date" as an example.
The question being raised is how, on Mac OS X, do you interact with 
external programs
and operating system commands from within Mathematica
without having to do MathLink programming.


Christopher Purcell
Sensors & Actuators Group
DRDC-Atlantic, 9 Grove St., PO Box 1012,
Dartmouth NS B2Y 3Z7 Canada
Work E-mail chris.purcell at drdc-rddc.gc.ca
Work Tel 902-426-3100 x389 Fax 902-426-9654
Home E-mail christopherpurcell at mac.com
AIM/iChatAV:   cffrc

On Jan 7, 2005, at 2:18 AM, DrBob wrote:

> Why not this?
>
> Date[]
> {2005,1,6,23,59,42.7903763}
>
> Bobby
>
> On Thu, 6 Jan 2005 22:00:41 -0500 (EST), Christopher Purcell 
> <chris.purcell at drdc-rddc.gc.ca> wrote:
>
>> Run is returning a status code and not the date. If you pipe the 
>> output
>> of data to a file
>> and read it, you will get your date. I recall an example in the
>> newsgroup archives where
>> this is done in a one-liner but here is something that will get you
>> started.
>>
>> log=$Failed;
>> status=Run["date>junk.txt"];
>> If[status==0,
>> (log=ReadList["junk.txt",Record];
>> DeleteFile["junk.txt"];),Null];
>> log
>>
>> Christopher Purcell
>> DRDC-Atlantic, 9 Grove St., PO Box 1012,
>> Dartmouth NS B2Y 3Z7 Canada
>> christopherpurcell at mac.com
>>
>>
>> On Jan 6, 2005, at 3:52 AM, m. r. schaferkotter wrote:
>>
>>> greetings:
>>>
>>> Run and RunThrough on OSX don/t seem to work as indicated in the Help
>>> Browser or the Mathematica Book.
>>>
>>> Run["date"]
>>>
>>> -1
>>>
>>> instead of the date.
>>>
>>> on Solaris the functionality is there:
>>>
>>> In[1]:= Run["date"]
>>> Wed Jan  5 20:42:13 CST 2005
>>>
>>>
>>> also the shell escape doesn/t seem to work.
>>>
>>> can anyone explain why this should be the case?
>>>
>>> m. r.
>>>
>>
>>
>> Dr Christopher Purcell
>> Sensors & Actuators Group
>> DRDC-Atlantic, 9 Grove St., PO Box 1012,
>> Dartmouth NS B2Y 3Z7 Canada
>> Work E-mail chris.purcell at drdc-rddc.gc.ca
>> Work Tel 902-426-3100 x389 Fax 902-426-9654
>> Home Tel 902-464-9248
>> Home E-mail christopherpurcell at mac.com
>> AIM/iChatAV:   cffrc
>>
>>
>>
>>
>
>
>
> -- 
> DrBob at bigfoot.com
> www.eclecticdreams.net
>


  • Prev by Date: Re: FullSimplify with Assumptions
  • Next by Date: Re: Re: FullSimplify with Assumptions
  • Previous by thread: Re: Re: Run, RunThrough on OSX?
  • Next by thread: Re: Run, RunThrough on OSX?