I have a script that I run from a Java GUI. It executes a SQL script and writes the results to a log file in the tmp directory. The rest of the script should open up an xterm and display the results of the output file to the screen. It creates the log file as supposed and it opens up an xterm as well. The only problem is that it freezes up after that point and I have to restart the whole process again. Here is an example of the script that I am using to open the xterm
#!/bin/csh -f
#set MYSQL=${MYSQL_HOME}/mysql
set PSQL=${PSQL_HOME}/psql
set MORE=/usr/xpg4/bin/more
set REPORT=/h/Scripts/DataValidation/ParametersDataReport.sql
#${REPORT}
${PSQL} ${USER}<${REPORT}
#Get the number of lines in the report file for scrollbar control
#set lc='wc -l /tmp/results.log'
#echo $lc
#Open an extra terminal
set title="EARTH ORIENTATION PARAMETERS REPORT"
/usr/openwin/bin/xterm -T "$title" \
-bg lightblue -fg black -sb -sl 2000 -ut -e ${MORE} \
-f /h/USERS/Pablito/results.log \
exit
MORE
and title
are defined as variables in the script file. Why is my script crashing and causing the terminal to hang up? Could this be a segmentation fault?
I am doing all this through an ssh connection. I looked at the command issued and this is what it states:
/usr/openwin/bin/xterm -sb -ls -display@d&@;
I typed this command on the terminal and it displayed the results pretty well. Why can't I do this from the GUI?
/usr/openwin/bin/xterm -T EARTHORIENTATIONPARAMETER -geometry 104x50+0+80 -bg lightblue -fg black -sb -sl 2000 -ut -e /usr/xpg4/bin/more -f /tmp/results.log
When I try to use the GUI it just freezes up on me (meaning I cannot access the GUI or the terminal). It also contains an error
bg: Command not found
on the terminal where the GUI was launched.
I guess what I really should be asking is how to I execute the following command in a csh script because when I type it manually from the terminal it produces the desired effect
xterm -T "EarthOrientation Parameter" -geom 104x50+0+80 -bg pink -fg black -sb -sl 2000 -ut -e /usr/xpg4/bin/more -f /h/USERS/local/Pablito/results.log