Message Boards Message Boards

0
|
144 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

WolframScript: suppress extraneous output?

Posted 9 days ago

$ /opt/homebrew/bin/wolframscript -code "AirTemperatureData[Here,Now] // First"

StringForm[Initializing `1` indices ...., WeatherData]
StringForm[Initializing `1` indices ...., WeatherData]
75.9

How do i prevent those StringForm lines from showing in the output so I only receive the 75.9 answer as the command-line output? I tried Quiet and the ;.

POSTED BY: Steven Buehler
2 Replies

Worked after applying escapes to $ (on Mac, unix-based); thanks.

wolframscript -code "o=\$Output; \$Output=CreateFile[]; t=AirTemperatureData[Here,Now] // First; Delete[\$Output]; \$Output=o; t"
POSTED BY: Steven Buehler
Posted 6 days ago
wolframscript -code "o=$Output; $Output=CreateFile[]; t=AirTemperatureData[Here,Now] // First; Delete[$Output]; $Output=o; t"
POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract