• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Return info from shell script?

Explorer ,
Nov 18, 2013 Nov 18, 2013

Copy link to clipboard

Copied

I know you can use app.system() in PS to execute a shell script.  Is there a way to capture the information it's outputting?

For example:

     var info = app.system('find /Users/ypml/Desktop -name \"*.jpg\"');

     alert(info);

just returns '0', instead of the list of files that were found.  Any ideas how to get that information?

thanks!

TOPICS
Actions and scripting

Views

593

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guru , Nov 18, 2013 Nov 18, 2013

Use a redirect to save the output to a file. Then read the info from the file.

Votes

Translate

Translate
Adobe
Guru ,
Nov 18, 2013 Nov 18, 2013

Copy link to clipboard

Copied

Use a redirect to save the output to a file. Then read the info from the file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 18, 2013 Nov 18, 2013

Copy link to clipboard

Copied

LATEST

thank you! you're a genius!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines