Scripts under MKS tips

From Cassandra

Jump to: navigation, search

Here are some hints to use when moving scripts from solaris to MKS
MKS man pages ...The missing man pages for the MKS toolkit. Very useful and contains some neat hacks for unix scripts on windows, like dlg.

  • Starting User Applications

/etc/fox/user_apps.dat does not work correctly under windows.
To start user applications create a script in /usr/fox/bin Prefix the script with go_ (e.g. go_CIMIO_FOXAPI.ksh). Put the name of you script at the end fox_apps.dat and leave off the go_

go_CIMIO_FOXAPI.ksh
:
sleep 120
c:/"Program Files"/AspenTech/CIM-IO/io/cio_fox_api/cimio_foxia_startup.bat

fox_apps.dat
DCI
AICC7
ADM
ACSA
FOXAPI
AIMAPI
AIMHISTORIAN
CIMIO_FOXAPI

Per the user notes for 8.X or above, custom software should be started in the file /etc/fox/user_apps.dat This gets started by the FoxApps Service on boot up. This also still has the log file user_apps.log to review issues that may occur due to the improper call of executable files.


  • Differences in more on solaris to more on MKS

On solaris the more /opt/fox/ciocfg/[A-Z0-9]*/*.s > mySeq.txt inserts the name of the file between :::::s before the contents of the file in the output file. Under MKS this no longer happens. To resolve use

pg /opt/fox/ciocfg/[A-Z0-9]*/*.s > mySeq.txt
  • nawk does not work under MKS

The new awk (nawk) command is not available. Use awk. The are a few differences in the behaivour of awk under solaris and MKS

  • Crontab

cron does not exists under MKS. To automatically run a script at certain times you can use.

  1. the at command
  2. use task schedular under windows
  • show_win/move_win

Although these are foxboro utilities under V8 windows they have created a utility called pos_win which provides similar functionality. It located in /usr/fox/wp/bin/tools

 pos_win [-h[elp]] | [-file [filename]] | [title-match-text] [[hostname] | [-size [WxH]] | [-position[XxY]]]
 pos_win [title-match-text] [-status [show | restore | minimize | maximize]]
 with no args, list windows.

examples

/usr/fox/wp/bin/tools/pos_win "Alarm Manager" -position 1025 10 
pos_win "FoxView WP1001:WP1001" -size 1280x1024
Personal tools