Giving instructions to an executable in UNIX?
It appears you want to send some number (586?) lines from FTIG_dldStruct.txt to the ./STP command? If so, assuming ./STP reads from standard input as is typical, that may look like:

head -n 586 FTIG_dldStruct.txt | ./STP


As pointed out in the comments to pass the entire contents of the file that would be:

./STP &lt; FTIG_dldStruct.txt


Various pipelines are also possible, perhaps to filter out comments (here arbitrarily defined as lines beginning with #) with grep:

grep -v '^#' FTIG_dldStruct.txt | ./STP


If you need ./STP to stick around after those commands are entered so the program can be interacted with, that's a more complicated issue and typically requires an expect script that in turn wraps around ./STP.

#!/usr/bin/env expect -f
set filehandle [open "FTIG_dldStruct.txt"]
set maxlines 586
spawn -noecho ./STP
while {[gets $filehandle line] &gt;= 0 &amp;&amp; $maxlines &gt; 0} {
    # wait for prompt from program
    expect -ex "STP&gt;"
    send "$line\r"
    incr maxlines -1
}
# turn interaction with the program over to the user
interact


This code would need to be saved to a file and made executable like any other script on unix. expect has also been made available as a library in various other programming languages.