« Return to Thread: "call" a script with an index notation

"call" a script with an index notation

by CPTZ :: Rate this Message:

Reply to Author | View in Thread

I'm running into a problem calling a script with an index notation in it, and with incomplete string recognition/pasing.

1st the incomplete string passing:

Here are the relevant lines from my script file:

set terminal postscript eps enhanced color
set output "$1.ps"
set title "$1"
plot "Data.txt" using 2:7:(100*($$15-.60)) with points pointtype 6 pointsize variable

I've doubled the $ within the using command to pull column data from the file as the help call says to -no problems there.

Here is my call command:

call 'index.script' ''89text-1''

It works, except it only passes the 89 to the file name and title.

So the output file is called 89.ps instead of 89text-1.ps
which is a problem, because eventually I'll have a -2 and -3 etc.

(and, the help says the parameters start at 0- this seems to show they start at 1, is the help correct?  If i start with $0 it doesn't pass the string at all)

--2nd problem--  it doesn't like passing a parameter to an index command
if I use my full 'line 19':

plot "AllData.txt" using 2:7:(100*($$15-.60)) index $2 with points pointtype 6 pointsize variable

and use the call command:

call 'index.script' ''89AZ-21'' '0'

I get the following error message:
 "index.script", line 19: undefined variable: AZ

It's passing the next part of the string to parameter 2 instead of parameter 2.

Any insight or suggestions for me to get this working?

Thanks






 « Return to Thread: "call" a script with an index notation