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

Return info from shell script?

Explorer ,
Nov 18, 2013 Nov 18, 2013

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
646
Translate
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.

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

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

Translate
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
LATEST

thank you! you're a genius!

Translate
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