Question
Tunneling Between Windows and Unix
We are migrating from Arbortext 5.3 for Unix to Arbortext 6.0 for Windows. All of our content will stay on our Unix file system. We have many customizations which call perl and shell scripts on the Unix system. From the Arbortext 6.0 installation, I have figured out how to run these scripts using PuTTY to generate a tunnel to the Unix server. How do I grab the output of one of these scripts to insert that data back into the XML file I am working on? For example, one of the scripts in question, uses the name of the journal and the manuscript id number to query our database for the DOI of the manuscript in question. In Arbortext for Unix we would assign a local variable as follows:
local return_value = `${codepath}/jpubs_get_doi_from_msid.pl ${journal} ${msid}`
The return_value is the result of running the perl script which in this case would be the DOI from the database.
In Arbortext for Windows, I have to do this as a system call:
local return_value = system("plink -ssh -i \"C:\Program Files (x86)\PuTTY\${user}.ppk\" $user@ucp-jrnls-cpt1.uchicago.edu ${codepath}/jpubs_get_doi_from_msid.pl ${develop_flag} ${ms_journal} ${ms_msid}" )
The return_value here is the exit status of the system call not of the running of the perl script. When the perl script finishes running a command window containing the result of the script (i.e., the DOI of the article in question) flashes on screen for a second. Does anyone know if there is some way to capture this result as an Arbortext variable so I can insert the value into my XML file?
I'd appreciate any suggestions.
Thanks,
Rick
local return_value = `${codepath}/jpubs_get_doi_from_msid.pl ${journal} ${msid}`
The return_value is the result of running the perl script which in this case would be the DOI from the database.
In Arbortext for Windows, I have to do this as a system call:
local return_value = system("plink -ssh -i \"C:\Program Files (x86)\PuTTY\${user}.ppk\" $user@ucp-jrnls-cpt1.uchicago.edu ${codepath}/jpubs_get_doi_from_msid.pl ${develop_flag} ${ms_journal} ${ms_msid}" )
The return_value here is the exit status of the system call not of the running of the perl script. When the perl script finishes running a command window containing the result of the script (i.e., the DOI of the article in question) flashes on screen for a second. Does anyone know if there is some way to capture this result as an Arbortext variable so I can insert the value into my XML file?
I'd appreciate any suggestions.
Thanks,
Rick

