Skip to main content
Inspiring
October 27, 2018
Question

execute sh file in illustrator

  • October 27, 2018
  • 3 replies
  • 1035 views

Hi,

How to execute .sh file using illustrator scripting..

the following code did not worked..

var f = File(File($.fileName).parent+"/sample.sh");

f.execute();

pls help

This topic has been closed for replies.

3 replies

Inspiring
October 27, 2018

ok, pls tell how to run .sh file from javascript?

i want to run terminal commands through javascript..

CarlosCanto
Community Expert
Community Expert
October 27, 2018

check the instructions in the link below

macos - How to run a shell script in OS X by double-clicking? - Stack Overflow

let us know if it worked

Inspiring
October 27, 2018

the file opened while double click on that file

OS - mac

CarlosCanto
Community Expert
Community Expert
October 27, 2018

I'm on mac as well, when I double click on it, it opens in a text editor application (Atom).

same thing happens if I use your javascript f.execute();

neither method "executes" the Bash script commands. Both methods just open the file in the editor.

CarlosCanto
Community Expert
Community Expert
October 27, 2018

what happens when you double click on that file?

what's your OS?