I want to run the following script from python:
temp=$(sky2xy image.fits 124.6456 -2.5517); arr=(${temp// / });
For that I am using the os.system()
module:
import os
os.system('temp=$(sky2xy image.fits 124.6456 -2.5517); arr=(${temp// / });')
But I am getting an unexpected syntax error
sh: 1: Syntax error: "(" unexpected 512
The error is due to the parenthesis used in arr=(${temp// / })
How should I get rid of this error?