LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Please Help with a small script ? (http://www.linuxquestions.org/questions/programming-9/please-help-with-a-small-script-8675/)

juglugs 11-13-2001 11:22 AM

Please Help with a small script ?
 
Could anybody tell what if anything is wrong with this script it simply will not run the file xoac in after setting the path to the required directory ie: \usr\angoss\bin. I think something in here must no longer be valid in Redhat 7.1 ??? When executed it should run the file xoac but just returns - no such file or directory.

Please help cant find any answers from the software distributors.


Cheers Juglugs.....


#!/bin/sh
# SID "@(#)xangoss.sh 3.2 - 95/07/06"
if [ $# = 0 ]; then
xoac&
exit 0
fi

x=`basename $0`
if [ X"$1" = X-x ] ; then
cat <<!
$x [-x] [s or w or d or c] [-a<command>] [-d<dir>] [-oa<size>] [-oe]
[-od<file>] [-oi] [-om<menu>] [-os<num>] [-ot<size>]
[-p<file>] [-RAD<path>]

Starts SmartWare PLUS in graphics mode (X11).

-x Display this explanation
s Start Spreadsheet (must be first argument)
w Start Word Processor (must be first argument)
d Start Data Base (must be first argument)
c Start Communications (must be first argument)
-a<command> Run a command ("-afile load \"mydoc\"")
-d<dir> Data directory (-d/usr/mydir)
-oa<size> Value stack size (-oa1000)
-oe Default project execution mode = in-memory
-od<file> Special start up screen (-odmyfile)
-oi Suppress start up screen (-oi)
-om<menu> Optional menu (-ommymenu)
-os<num> Override detection of speech rec. software
-ot<size> String stack size (-ot1000)
-p<file> Run project upon entry (-pstart)
-RAD<path> Home directory of RAD application to start
-pulldown Run with pulldown menus

NOTE: For the above agruements, do not put a space between the flag and
arguements.

X11 Switches

-geometry WxH Change the size (in characters) W=Width, H=Height
-font fontname Change the font to use

!
exit 1
fi

exec xoac $*&:Pengy:

tarballedtux 11-13-2001 07:17 PM

Maybe...
 
try:

#!/bin/bash

and I'm not sure what the first if statement does but
try:

xoac &

NOTE: the space between the program name and the ampersand



If that doesn't work give us more detailed information like what the exact messages that you receive are and what ever you think is necessary.

juglugs 11-14-2001 02:39 AM

Ok, tried taking out the if statement also tried replacing xoac with ./xoac and ./xoac &, there is some progress here ie: it now does nothing at all, by which I mean there are no errors returned however nor is the programme running either.

There are instructions that say set your paths and display environment like this:

ANGOSS=/usr/angoss
export ANGOSS

DISPLAY=machine-name:0.0
export DISPLAY

Are these valid - they appeared to be accepted ?

This is old software it's called Angoss Smartware Plus (a cross platform development suite including database, spreadsheet, comms and wordprocessor) - it used to run fine on older versions of RH (5.1 or before) and other linux platforms, but now for some reason it won't run on the newer versions. Could it be a library link or path problem ?

The main errors I get are No such file or directory. But now there are no errors at all, but no programme, even when I reverse the amendments to the file I still get no errors ?

Talk about a bit bemused i've just found this at one of the download site ftp://ftp.angoss.com/pub/smartware/demos/linux/:

BTW, the X version requires X11R6.

I guess this is the release of X11 it needs ?

Please Help :confused: :confused: :confused:

Cheers

JugLugs


All times are GMT -5. The time now is 06:03 AM.