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 directory $gensys/bin. Small programs or scripts which don't need an input data file are documented here on this webpage. Larger programs have in addition to this webpage also own users manuals, which describes the program in more detail.

All programs and scripts in Gensys accepts option -h, which gives a short description of what the programs does and which command line options are valid.

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

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:

genclean = Cleans current directory from GENSYS work-files
datum = Write current date in the format yymmdd
del = Move objects to directory $gendel and save them for three days before removing them permanently
diff_dir = Compare current directory with another directory
dos2ux = Translates ASCII-files from DOS-format into UNIX-format
fcd = Find directory
gen_rsync = Synchronize two directories with each other
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 with each other
opdiff_dir = Compares two directories with each other
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:


genclean [opts] <arg>

Script genclean removes GENSYS-files in current directory. The argument determines type of files to be removed.

Following command line options are understood:

mplot = Delete files with extension cata, mp, mp2, print, resu, stat2, ps, eps and pdf
opti = Delete files with extension expf, runc and qout
rslt = Delete files with extension gp, id, id2, mode, modf and modjac
temp = Delete files with extension ca, mp, mp2, list and out
all = Removes all files with above extensions

Following options are understood:

-h        = Writes this help text
--dry-run = Only make a dry run


del [options] <object(s)>

Object(s) are removed from its location, but saved at another location before a complete removal. An object may be a file, directory or link. If environment variable $gendel is set, the deleted object(s) will be moved to the directory to where $gendel points. If environment variable $gendel is unset, the deleted object(s) will be send to directory "/tmp/gensys_deleted_files/$USER". If environment variable $gendel is set equal to "/dev/null" the object(s) will be removed immediately.

Following command line options are understood:

--quiet Do not write any information or error messages
--dry-run Make a dry run, only showing objects to be removed
--no_wildcard Do not make a wildcard expansion



diff_dir [options] <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 too.

Following command line options are understood:

-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].




gendu [options]

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

The only option that is understood is "-h", which gives a short description of what the script is doing.



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> [file3]

Script opdiff compares two or three files with each other. If meld is installed on your system, this script will be used, otherwise diff.

The following options are understood:

--ref Compare with a reference Master input data file.


opdiff_dir [options] <directory>

Script opdiff_dir compares current directory with <directory>. The output is stored in a temporary file, which after completion is opened in text editor op.

The following options are understood:

-h Print this help information
-r Travel down the directory structure recursively
+r Do not travel down in the directory structure (Default)
-s Sort output (Default)
+s Do not sort output
-t Write the output file in directory /tmp
+t Write the output file in current directory "." (Default)


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.
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
-pdf Only create a PDF-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