Description:
The AWK programming language.
|
|
|
2|3lines
|
| |
hi, Input: Component Part # Serial Description Date Time Vend Location --------- ------ ------ ----------- ---- ---- ---- -------- SSC0 501-5407-14-59 038298 System Cont 09/22 05:21:53 012c Sriracha, roller 2004 GMT+05:00... more »
|
|
print one blank line in a for cycle
|
| |
Hi, I have this text file: $ cat aa.txt sd_1k_ | 3950 | 38 | 126 | 158 | 48 | 78 | 0.0557 ... sd_1l_ | 3950 | 38 | 79 | 74 | 26 | 38 | 0.1051 ... sd_1m__1trim | 3950 | 38 | 18 | 15 | 10 | 7 | 0.0114 | -0.0264 | 0.0150 | 0.0378 | -0.0233 | -0.6164... more »
|
|
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... more »
|
|
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,... more »
|
|
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... more »
|
|
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/ {... more »
|
|
|