Skip to main content

I have a very basic question. I have a shell file test.sh that prints let's say YeahYeah to a file called output.txt

#!/bin/shoutput.txt:

echo "Yeah" > output.txt

#!/bin/sh

echo "Yeah" > output.txt

I am running the RunRun command from the notebook Run["sh test.sh"]:

Run["sh test.sh"]

But it is not creating the file output.txtoutput.txt. Can anyone tell me please what is going wrong  ?

Thanks in advance

I have a very basic question. I have a shell file test.sh that prints let's say Yeah to a file called output.txt

#!/bin/sh

echo "Yeah" > output.txt

I am running the Run command from the notebook Run["sh test.sh"] it is not creating the file output.txt. Can anyone tell me please what is going wrong  ?

Thanks in advance

I have a very basic question. I have a shell file test.sh that prints let's say Yeah to a file called output.txt:

#!/bin/sh

echo "Yeah" > output.txt

I am running the Run command from the notebook:

Run["sh test.sh"]

But it is not creating the file output.txt. Can anyone tell me please what is going wrong?

Source Link
Sayak
  • 121
  • 1
  • 4

How to run a shell script from inside Mathematica

I have a very basic question. I have a shell file test.sh that prints let's say Yeah to a file called output.txt

#!/bin/sh

echo "Yeah" > output.txt

I am running the Run command from the notebook Run["sh test.sh"] it is not creating the file output.txt. Can anyone tell me please what is going wrong ?

Thanks in advance