説明:
The AWK programming language.
|
|
|
Two functions to facilitate IPv4 address comparison
|
| |
To generate reports from mail server log, I often need to sort IPv4 addresses. As the system sort is oriented to string comparison, the result of direct IPv4 address sorting would look out of place to human. For example, the sorting of 192.168.3.4 and 192.92.244.3 will produce: 192.168.3.4 192.92.244.3... 詳細»
|
|
scriplet calculates arbitrary resistor values
|
| |
Hi there, Last few months I spend more time with soldering iron than keyboard, so here's a script for finding an arbitrary resistor value from two standard values in series or parallel combination -- it's a common issue in electronics design. Bash wrapper is used simply to read the command line input value,... 詳細»
|
|
Q: Handling a monster pattern to match one of many words
|
| |
I need to search a lot of files (over 1,000) and find all the lines that contain any of a moderately large number of words (over 500). When a line contains any of these words, I want to make them visible. To do this, I store the words in an array words[1 to n] and build up a pattern string of the form... 詳細»
|
|
Nested address ranges in awk
|
| |
Here's what I want to do: I want to grab a block of text from 'from_pattern' to 'to_pattern', and with that block of text I want to print to screen the last column of those lines containing the secondary patterns 'local_pattern1' and 'local_pattern2'. I.e. something like this: .../from_pattern/,/to_pattern/ {... 詳細»
|
|
codelines.awk
|
| |
Wrote a quick & dirty line counter for my scripts, but noted: If the final line of the file that's being counted contains an empty newline, its excluded. So... either only consecutive empty lines (excepting the final line) are considered, or I'm not understanding something with this script: { CMT="#"... 詳細»
|
|
sorting
|
| |
Since I promised Tim Menzies I'd try to get involved in awk.info, I'm considering posting the code below as an example of using functions, arrays, string vs numeric comparison, etc. The sorting algorithm is O(n^2). If anyone feels like doing a more efficient equivalent, that'd make for an interesting comparison too. Any other feedback (especially... 詳細»
|
|
runawk-0.18.0 has been released
|
| |
I've released new version of runawk. ------------------------------ ------------------------------ WHAT IS RunAWK: runawk is a small wrapper for the AWK interpreter that helps one write standalone AWK scripts. Its main feature is to provide a module/library system for AWK which is somewhat similar to Perl's... 詳細»
|
|
Field separator characters ?
|
| |
Windows gawk newbie. Can anyone here answer any/all of the following questions please ? (1) Is there any way to find out what field separators are "okay" and which aren't ? A list, or web page, perhaps ? (2) Can one have multiple field separators for the one input file ? For example, could one have a single space AND eg. ! So that eg.... 詳細»
|
|
|