If the vecotrs are not too long you can use the --eval options to write an octave command in a string.
prove.sh
#!/bin/bash
# .... do something that processing vector1 vector2
vector1="[1 2 3 4 5 6 7 8 10]"
vector2="[2 1 5 8 2 9 0 10 8]"
# ..... using octave to plot and image witouth prompting
octaveCommand="draw(${vector1},${vector2});"
echo "Command to exec: ${octaveCommand}"
octave -q --eval "${octaveCommand}"
draw.m
function draw(x,y)
plot(x,y);
print("graph.png","-dpng");
The -q option is to avoid the octave message at the startup. If you don't want the plot window to close you can use the --persist option to avoid octave to exit once the command is done but then you will need to manually end it by tipping exit in the terminal. At least it works for octave 3.2.3. To see more options you can tip "octave --help" in a terminal.