Re: Preventing extraneous output from osascript -l JavaScript
Re: Preventing extraneous output from osascript -l JavaScript
- Subject: Re: Preventing extraneous output from osascript -l JavaScript
- From: Paul Scott <email@hidden>
- Date: Wed, 16 Dec 2015 14:44:13 -0800
- Dkim-filter: OpenDKIM Filter v2.10.3 secure.paul-scott.us 91A6E40130
> On Dec 16, 2015, at 2:12 PM, Axel Luttgens <email@hidden> wrote:
>
> Could you tell us a bit more about your goal?
As simple as this: I don’t want extraneous output from osascript; i.e., nothing I didn’t write to stdout/stderr, or legitimate error messages from osascript.
> Anyway, it seems that the "problem" may be reduced to:
>
> #!/usr/bin/osascript -l JavaScript
> var app = Application.currentApplication();
> app.includeStandardAdditions = true;
Let’s reduce it further:
#!/usr/bin/osascript -l JavaScript
Run that, and an extra linefeed is ejected. Of course, I can redirect stdout/stderr, but that’s not what I want to do. I want stdout/stderr directed to the terminal, and I want to see any output produced, *except* extraneous output from osascript such as the result of the last executed line or even a lowly linefeed.
The Above single line script (assumed name q) should run like this:
$ ./q
$
Not like this:
$ ./q
$
I can achieve this result with -l AppleScript but not -l JavaScript specified. If there is nothing I can do within the script to avoid this inconsistent behavior, I will file a bug report. But I thought I’d first ask if anyone had solution.
Thanks,
Paul
_______________________________________________
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