| 1 |
====================================================================== |
| 2 |
|
| 3 |
runawk: small wrapper for AWK interpreter that impements modules |
| 4 |
system and helps one to write the standalone AWK programs. |
| 5 |
|
| 6 |
author: Aleksey Cheusov <[email protected]> |
| 7 |
|
| 8 |
project's home page: http://sourceforge.net/projects/runawk |
| 9 |
|
| 10 |
licence: MIT license |
| 11 |
|
| 12 |
====================================================================== |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
MOTIVATION |
| 17 |
|
| 18 |
See section MOTIVATION of runawk.1 or runawk.pod. |
| 19 |
|
| 20 |
====================================================================== |
| 21 |
|
| 22 |
INSTALLATION |
| 23 |
|
| 24 |
See INSTALL file. |
| 25 |
|
| 26 |
====================================================================== |
| 27 |
|
| 28 |
MODULES |
| 29 |
|
| 30 |
RunAWK provides lots of AWK modules ready for use. All of them are |
| 31 |
under modules/ subdirectory. They are installed by default. |
| 32 |
|
| 33 |
abort.awk, alt_assert.awk |
| 34 |
- power abort() and assert() |
| 35 |
alt_join.awk - join :-) |
| 36 |
braceexpand.awk - awk equivalent to shell's braceexpand functionality |
| 37 |
basename.awk, dirname.awk |
| 38 |
- equivalents to basename(1) and dirname(1) |
| 39 |
embed_str.awk - reads strings from AWK code |
| 40 |
exitnow.awk - |
| 41 |
has_prefix.awk, has_suffix.awk |
| 42 |
- trivial string functions |
| 43 |
match_br.awk - find pair closed brackets in a string |
| 44 |
max.awk, min.awk, isnum.awk, abs.awk |
| 45 |
- trivial math functions |
| 46 |
modinfo.awk - routines to get an information about modules that |
| 47 |
are in use |
| 48 |
multisub.awk - another replacement functions |
| 49 |
pow.awk - synonym for ^ |
| 50 |
init_getopt.awk, alt_getopt.awk, power_getopt.awk |
| 51 |
- POSIX/SUS compatible routines |
| 52 |
for handling options EASILY ;-) |
| 53 |
readfile.awk - read an entire file into variable |
| 54 |
runcmd.awk - safe wrapper over system() |
| 55 |
shquote.awk - escapes shell's special characters |
| 56 |
heapsort.awk, quicksort.awk, sort.awk |
| 57 |
- sorting functions |
| 58 |
str2regexp.awk - string to regexp routines |
| 59 |
tokenre.awk - alternative mechanism for separating input into tokens |
| 60 |
xclose.awk, xgetline.awk, xsystem.awk |
| 61 |
- functions to write robust programs |
| 62 |
tmpfile.awk - generates names of automatically deleted tempfiles |
| 63 |
fieldwidths.awk - portable equivalent of GNU awk's FIELDWIDTHS ;-) |
| 64 |
CR_in.awk - removes CR symbols from input lines. |
| 65 |
trim.awk - functions for trimming spaces from the string. |
| 66 |
trim_in.awk - trims spaces from input lines. |
| 67 |
backslash_in.awk - treats backslash symbol at the end of line as |
| 68 |
"this line will continue on the next one". |
| 69 |
ini.awk - functions for reading Win .ini files. |
| 70 |
ftrans_in.awk - handle data file transitions |
| 71 |
ord.awk - character to id and id to character convertors |
| 72 |
|
| 73 |
====================================================================== |
| 74 |
|
| 75 |
SCRIPTS |
| 76 |
|
| 77 |
RunAWK also provides a few scripts: |
| 78 |
|
| 79 |
alt_getopt - program arguments parser aware of long options, |
| 80 |
alternative to POSIX getopts and getopt(1). |
| 81 |
In addition to alt_getopt(1) utility alt_getopt.sh |
| 82 |
shell library is also provided that provides |
| 83 |
an alternative way for handling options. |
| 84 |
alt_getopt.sh - shell library functionally equivalent |
| 85 |
to alt_getopt(1) |
| 86 |
|
| 87 |
====================================================================== |
| 88 |
|
| 89 |
EXAMPLES |
| 90 |
|
| 91 |
Lots of examples are available in examples/ subdirectory. |
| 92 |
|
| 93 |
====================================================================== |
| 94 |
|
| 95 |
PACKAGES |
| 96 |
|
| 97 |
1) NetBSD, DragonFlyBSD, Linux, Solaris... (pkgsrc) |
| 98 |
|
| 99 |
RunAWK is packaged in pkgsrc as wip/runawk. |
| 100 |
|
| 101 |
2) FreeBSD |
| 102 |
|
| 103 |
RunAWK is packaged in FreeBSD ports as lang/runawk |
| 104 |
|
| 105 |
3) Debian/lenny/x86 |
| 106 |
|
| 107 |
Add the following lines |
| 108 |
|
| 109 |
deb http://mova.org/~cheusov/pub/debian lenny main |
| 110 |
deb-src http://mova.org/~cheusov/pub/debian lenny main |
| 111 |
|
| 112 |
to /etc/apt/sources.list and then using apt or aptitude commands. |
| 113 |
Binary packages are available only for Debian/Lenny/i386. |
| 114 |
Ubuntu users need to recompile the package for their system. |