Home    Reference Manuals    Return   


Scripts used in the GENSYS package   


The programs in the GENSYS package is controlled by a number of scripts which are located in the directory $gensys/bin. Small programs in GENSYS which don't need an input data file are only documented on this page. Bigger programs which needs an input data file, have besides of this document also an own users manual which describes in detail all input data which can be feed into the program.

This document is divided into two parts:



Summary of scripts executing GENSYS-programs:

cata_gp = Examine the contents of GPdat-files.
cataf = Make a full dump of a MPdat-file
catas = Make a short dump of a MPdat-file
conv_ca = Translates *.ca-files to *.id-files in MPdat-format
fresp = Starts program FRESP
ftrans = Starts program FTRANS
func = Starts program FUNC
gplot = Starts program GPLOT
kc_prop = Calculate stiffnesses and damping in a kc-coupling
kpf_* = Starts program in the KPF-group
modal = Starts program MODAL
mplot = Starts program MPLOT
mtable = Program reading MPLOT result files and writes a summary in a table
npick = Starts program NPICK
opti = Starts program OPTI
plot_cur = Starts program PLOT_CUR
predat = Starts program PREDAT
psd = Starts program PSD
psd_four = Starts program PSD_FOUR
quasi = Starts program QUASI
trc_* = Starts program in the TRACK-group
tsim = Starts program TSIM
um = Opens the GENSYS manual pages
um_search = Search for an expression in the GENSYS manual pages
wd_org = Sorts files into subdirectories



Scripts for executing GENSYS-programs



cata_gp <GPdat-file>

Writes the contents of a *.gp-file in a human readable format.
Program cata_gp can start with and without argument. If cata_gp starts without argument, the user will be prompted to give a name of a GPdat-file. If cata_gp starts with arguments they will be examined as if they were GPdat-files. The output from program cata_gp will be written an ASCII-file with extension '.list'.



cataf [options] <MPdat-file>

Writes a full dump of a file written in MPdat-format.
Program cataf can start with or without argument. If cataf starts without argument, the user will be prompted to give a name of a MPdat-file. If cataf starts with arguments they will be examined as if they were MPdat-files. MPdat-files have file extension *.id or *.mp.

The following options are understood:
-h Write help text
-store Write the output to file list/$ident.id_cataf.list
-no_store Write the output to temporary file /tmp/$ident.id_cataf.list
-matlab Write the output in a matlab .m-format to file list/$ident.id_cataf.m
-no_matlab Write the output in standard format



catas [options] <MPdat-file>

Writes a short dump of a file written in MPdat-format.
Program catas can start with or without argument. If catas starts without argument, the user will be prompted to give a name of a MPdat-file. If catas starts with arguments they will be examined as if they were MPdat-files. MPdat-files have file extension *.id or *.mp. If option -store is given the output will be written to a file with extension *.list.

The following options are understood:
-h Write help text
-store Write the output to file list/$ident.id_cataf.list
-no_store Write the output to temporary file /tmp/$ident.id_cataf.list



conv_ca [options] <ca-files>

Whilst performing calculations in CALC, a continuous printing of the results can be made to file $IDENT.ca, in case if an unexpected breakdown takes place. This file must, however, be converted before it can be used in MPLOT, normally this will be done in the script FRESP, MODAL, QUASI or TSIM. However, when the script or calculation is interrupted, this conversion must be carried out manually, by writing: conv_ca $IDENT.ca



fresp | modal | quasi | tsim [options]

These four scripts starts the central calculation program CALC in GENSYS. Program CALC is common in all types of analysis, the different scripts starts program CALC in different modes. Program CALC and its scripts accepts a number of options, for more information please look in the CALC-manual Command line options.



ftrans

Starts the FTRANS-program, script ftrans simply asks for an input data file and then launches the program.



func

Starts the FUNC-program, script func simply asks for an input data file and then launches the program.



gplot

Starts program GPLOT.



mplot [options]

Starts program MPLOT. Program MPLOT and its scripts accepts a number of options, for more information please look in the MPLOT-manual Command line options.



mtable

Starts the MTABLE-program, script mtable simply asks for an input data file and then launches the program.



npick

Starts program NPICK in GENSYS. Program NPICK and its scripts accepts a number of options, for more information please look in the NPICK-manual Command line options.



predat [options]

Starts program PREDAT in GENSYS. Program PREDAT and its scripts accepts a number of options, for more information please look in the PREDAT-manual Command line options.



trc_concat, trc_fourpl, trc_fourpl2, trc_imauz, trc_imauz_a, trc_imauz_b, trc_iplas, trc_iplas_a, trc_iplas_b, trc_ipsd, trc_istat, trc_mauz, trc_mauzcur,trc_mauzmod, trc_mauzpl, trc_mean, trc_plas, trc_plascur, trc_psdpl, trc_statpl, trc_tracmod, trc_tracpl

Starts a program in the TRACK-group, the scripts simply asks for an input data file and then launches the program.



um

The GENSYS manual pages opens in a web-browser. The user can control the preferred web-browser with the environment variable $genhtml.



um_search <expr>

Searches for expression <expr> in all manual pages.



wd_org [-q]

Sorts files with known extensions to subdirectorys. If files shall be sorted under subdirectorys or not will the user controll in the environment variable $gendir. Option -q stands for quiet, i.e. no error messages will be printed.




Summary file managing scripts:

clean = Cleans current directory from GENSYS work-files
datum = Write current date in the format yymmdd
del = Move files to directory /tmp/rmfiles/$USER and save them for three days before removing the files permanently
diff_dir = Compare current directory with another directory
dos2ux = Translates ASCII-files from DOS-format into UNIX-format
fcd = Find directory
gencd = List frequently used directories
gendu = List the sizes of all subdirectories in current directory
gengrep = Searches for an expression in a directory recursively
genps_size = List all running processes sorted in size order.
genrename = Rename a group of files.
lb = List big files
ldir = Listing of subdirectories only
li = List files in current directory and below containing a specific text-string.
lintpl = Starts an interactive program performing linear interpolations.
lnew = List the ten newest modified files.
op = Starts a texteditor and opens a file
opdiff = Compares two files in a texteditor
opdiff_dir = Compares two directories in a texteditor
opman = Opens a UNIX-manual in a texteditor
optar = Reads the table of contents of a UNIX tar-file
opterm = Opens a new xterm-window in a specified directory
pri = Prints textfiles and postscriptfiles
ps_rotate = Rotates a postscriptfile
ps2epsi = Adds a preview to a postscriptfile
q_del = Deletes jobs in the queue system
q_stat = Lists jobs in the queue system.
q_stop = Stops the queue system daemon
skip_lines = Reduce a file by only printing every nskip line
sort_mtabler = Sort resultfiles *.mtabler written by program MTABLE
ux2dos= Translates ASCII-files from UNIX-format into DOS-format



File managing scripts:

clean arg

Script clean removes GENSYS-files in current directory. The argument determines which type files are to be removed.

Following arguments are understood:

infiles = Delete files with extension expf, ingplot, innpick, inopti and inpdat
mplot = Delete files with extension cata, mp, mp2, post, print, resu and stat2
rslt = Delete files with extension cata, gp, id, id2, mode, modf, print, resu, run and stat2
temp = Delete files with extension ca, err, ingplot, list, meta, mp, out, post, ps, sbstr and work
all = Removes all files with above extensions


del [-q] <files> or <directory>

Remove <files> or <directory> from current directory.
If environment variable $gendel is set, the deleted files and directories will be moved to the directory to where $gendel is pointing. If environment variable $gendel is unset, the deleted files and directories will be send to directory /tmp/$USER/rmfiles. Files and directories will be saved for 3 more days before they are permanently removed from the harddisk.
If environment variable $gendel is set equal to /dev/null the files and directories will be removed from the harddisk immediately.

Options:
-q Remove files and directories quietly



diff_dir [-r] <directory>

Compare current directory with <directory>. All files found in current directory are compared with the file with the same name in the other directory. In order to make a complete comparison the user should change current directory to <directory>, and make the comparison the other way also.

Options:
-r Travel the directory structure recursively



dos2ux [files]

Translates ASCII-files from DOS-format into UNIX-format. If files is replaced by a * the whole current directory will be translated. Script dos2ux is harmless if the file already is stored in UNIX-format.




fcd [directory]

Where [directory] is the directory which shall be found. Script fcd puts the command cd in front of each found directory, in order to make it easy to copy the line to the promt.

If the [directory] argument is omitted, all directorys current directory are listed.




gencd [options] [string]

List frequently used directories
The frequently used directories are stored in file ~/gensys/.gensys/gencd (or ~/.gensys/gencd if directory ~/gensys is missing).
To add a new directory use option --add
To remove a directory use option --del
In case file ~/gensys/.gensys/gencd is very long. The output can be filtered by specifying option [string].




gencd [options] [string]

List the sizes of all subdirectories in current directory.
The files are listed in size-order.




gengrep <expr> [dir]

Script gengrep searches for an expression <expr> in a whole directory structure. The search expression can be written as a regular expression in UNIX. The search can be limited by the [dir] argument, if the [dir] argument has been read script gengrep will only search in that subdirectory.

The following characters have special meanings in a regular expression:
^ The beginning of the line
$ The end of the line
[xy] Matches both x and y.
[a-z] Matches all lower case letter.
[0-9] Matches all numbers.
[^x] Matches any character except x.
. Any character.
* Repeats the character in front of the *-sign, the character will be repeated zero or more times.
\ Quote the next character. Example: if you are searching for a $-sign you must write \$ in the search expression.
For further information regarding regular expression, see http://en.wikipedia.org/wiki/Regular_expression



genps_size

Script genps_size lists all running processes sorted in size order. The command is useful to see which processes that uses the most of the computers primary memory.




genrename <tag1> <tag2>

Script genrename renames all files having string <tag1> in their file names. The string <tag1> will be replaced by string <tag2> in all files.
Script genrename is run in the following steps:
- Command "genrename <tag1> <tag2>" creates an executable file /tmp/genrename_$USER
- File /tmp/genrename_$USER opens in an editor for inspection
- The user can manually modify file /tmp/genrename_$USER
- The files will be renamed by launching script /tmp/genrename_$USER




lb [file-size]

List big files in current and all subdirectories below. As argument to script lb the minimum file size can be given. If the file-size is omitted a file size of 100 blocks will be used.



li [Options] [file-tag]

List files in current directory and below.

Options:
All options availably in the UNIX-command ls are also understood by script li. In addition to the options in command ls the following is also understood:

--all Search for files in all subdirectories

File-tag:
All files containing the text-string [file-tag] will be listed. If [file-tag] is omitted all files will be listed.



lnew [arg]

List the ten newest modified files.

Options:
All options availably in the UNIX-command ls are also understood by script lnew. In addition to the options in command ls the following is also understood:

--all Search for files in all subdirectories

File-tag:
All files containing the text-string [file-tag] will be listed. If [file-tag] is omitted all files will be listed.



op [options] <files>

Script op opens file(s) in an editor. Which editor is started is controlled by the environment variable $genedit. By using wildcards several files can be opened simultaneously.
If <files> is replaced by an hyphen (-), the name of the files will be read from standard input.
Options:
Following options are understood:

-n Opens the newest file in the directory
-s <expr> Open a window and search for expression <expr> (Works only in the vi-editor)
-q Opens files quietly.


opdiff [options] <file1> <file2>

Script opdiff compares two files and opens the result in the editor defined in the environments variable $genedit. The UNIX-script diff is used for comparison of the two files.

Options:
Following options are understood:
-y Prints the two files side-by-side.


opdiff_dir [options] <directory>

Script opdiff_dir compares current directory with <directory> and opens the result in the editor defined in the environments variable $genedit.

Options:
Following options are understood:
-r Travels down in the directory structure recursively.


opman [section] <UNIX-command>

Script opman copies the man-page of a UNIX command into a file and opens the file in an editor. Which editor is started is controlled by the environment variable $genedit. If the <UNIX-command> specified under the opman-command exists under more than one section, the user will be prompted to specify from which section the manual should be read.



optar <tar-file>

Script optar reads the table of contents of a UNIX tar-file and writes the result into a temporary file, which is opened by an editor. Which editor is started is controlled by the environment variable $genedit.



opterm <directory>

Script opterm starts a new xterm-window in specified directory. If directory is omitted opterm will start the xterm-window in current directory. The user has a lot of possibilities to customize the xterm-window, please have a look in document Using the genterm-terminal.



pri [options] <files>

Script pri sends <files> to printer. The file is send to the printer defined in the environmentvariable $LPDEST.

options:
Following options are understood:

-pmode Print textfiles in Portrait mode (default)
-lmode Print textfiles in Landscape mode
-frame <num> Print frame number <num>
-magnify <num> Print textfiles with scalefactor <num>
-quiet Quiet, don't print a warning message if the file is missing
-pdir Print textfiles with directory information (default)
-no_pdir Print textfiles without directory information
-ps Only create a postscript file of the textfile, don't send it to the printer


ps_rotate <angle> <infile> <outfile>

Rotates a postscript file generated in GENSYS a rotation angle <angle>. Any previous rotations made to the postscript file will be removed. Valid rotation angles are: 0, 90, 180 and 270.



ps2epsi <infile.ps> <outfile.epsi>

Adds a preview to a postscript file. Can be convenient when the postscript file is inserted in a word-processor e.g. Word, StarOffice,, etc.



q_del  <ID-number(s)>

Deletes jobs in the queue system. The jobs are identified by their ID-numbers. Please use the command "q_stat" in order to see the ID-numbers.



q_stat

Lists jobs in the queue system.



q_stop

Stops the queue system daemon. The queue system daemon can only run in one directory. If you want to make calculations in another directory. The daemon must be stopped and restarted in the new directory. A new daemon will automatically start when a new job is launched.



skip_lines

Reduce a file by only printing every nskip line.
Default value for nskip is 2.



sort_mtabler <column> <infile> <outfile>

Sort *.mtabler result files, written by program MTABLE. The first argument <column> defines which column in the <infile>, which shall be sorted. N.B. the leftmost column in infile is denoted 0 and the second leftmost column in infile is denoted 1, etc. In the same way as the UNIX-command sort are doing. The second argument defines the unsorted input data file. The third argument defines the sorted output data file. The main difference between sort and sort_mtabler is that commentary lines not are sorted.



ux2dos [files]

Translates ASCII-files from UNIX-format into DOS-format. If the user writes * instead of a file list, all files in current directory will be translated.




Top of page