Sunday, August 19, 2018

#1 2018-08-11 03:40:51 am

Jenny David
Member
Registered: 2018-03-24
Posts: 10

How to reorder the returned output separated with commas & quotes?

Hi there,

Applescript:

do shell script "command1"

I have a simple command1 that returns the output as below:

Apple
Orange
Mango
Banana


However, I'd like the output to be returned as:

{"Apple", "Orange", "Mango", "Banana"}

How do I approach this in Applescript?

Thank you in advance.

Model: MacBookPro 6,2
AppleScript: Version 2.10 (194)
Browser: Safari 537.36
Operating System: Mac OS X (10.13 Developer Beta 3)

Offline

 

#2 2018-08-11 03:55:02 am

Nigel Garvey
Moderator
From:: Warwickshire, England
Registered: 2002-11-20
Posts: 4623

Re: How to reorder the returned output separated with commas & quotes?

Hi.

Applescript:

paragraphs of (do shell script "command1")


NG

Online

 

#3 2018-08-11 04:27:20 am

Jenny David
Member
Registered: 2018-03-24
Posts: 10

Re: How to reorder the returned output separated with commas & quotes?

Nigel Garvey wrote:

Hi.

Applescript:

paragraphs of (do shell script "command1")



Wow! That worked like a charm. Thank you so much Nigel big_smile

Model: MacBookPro 6,2
AppleScript: Version 2.10 (194)
Browser: Safari 537.36
Operating System: Mac OS X (10.13 Developer Beta 3)

Offline

 
pornplaybb.com shemalevids.org macromastiavideo.com

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)