1

Hi I'm trying to write a shell script for plotting with gnuplot however I keep running into the error: bash: ./plot.sh: 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:

#!usr/bin/gnuplot

reset
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.

  • 2
    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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.