Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I'm trying to write a shell script for plotting with gnuplot however I keep running into the error: bash: ./ usr/bin/gnuplot: bad interpreter: No such file or directory I have checked the location 'usr/bin/gnuplot' and it definitely exists. I have also checked the permissions on the file and it is executable. I have also checked I can open gnuplot manually through the interpreter and encountered no problems here.

The following is my file:


set terminal png
set output 'test.png'
set key inside left top vertical Right noreverse enhanced autotitles box linetype -1 linewidth 1.000
set samples 200, 200

set title "Arc trig"
set xlabel "x"
set ylabel "y"
set grid

plot [-3:5] asin(x),acos(x)

I'm running Ubuntu 12.10.

Any ideas would be much appreciated. Thanks.

share|improve this question
typo in the shebang line, should be #!/usr/bin/gnuplot – dawud May 4 '13 at 16:08
Consider making sure you have permission to write the png file to the current directory. – Charlie Wilson May 4 '13 at 16:10
God I feel stupid, thanks so much problem solved. – wookie1 May 4 '13 at 16:15
up vote 1 down vote accepted

Missed the "/" #!/usr/bin/gnuplot

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .