Skip to content

babarot/manyawk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Many AWK

🐒 manyawk is the AWK library that provides many comprehensive AWK utility functions.

Description

This manyawk library structure is inspired by Golang packages structure.

Installation

To get manyawk:

$ git clone https://github.com/b4b4r07/manyawk

Then you'll need to set the AWKPATH environment variable to this library directory root when using manyawk.

$ export AWKPATH=/path/to/manyawk    # this library

Usage

You must load modules from manyawk you want to use and add @include "module/module.awk" to your awk script.

#!/usr/bin/env gawk -f

@include "math/similarity.awk"

BEGIN {
    printf("%f%\n", similarity(ARGV[1], ARGV[2]))
}

To save the awk script above as leven_dist.awk, and to run:

$ AWKPATH=. awk -f leven_dist.awk "awk is fun" "gawk is fun"
95.238095%

VS.

License

MIT © BABAROT (a.k.a. b4b4r07)

About

🐒 GNU AWK library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published