Description:
The AWK programming language.
|
|
|
awk or shell solution
|
| |
Hi
I have a file with just two lines as below :
hostname^Enclosure^Company^Mod el^Host^IP^Datacenter^CPU^RAM
hostname1^ENC0009^Company1^rx8 640^^10.130.120.10^Datacenter1 ^4^64G
I want the output as below:
hostname : hostname1
Enclosure : ENC0009
Company : Company1
Model : rx8640
Host :... more »
|
|
Gawk 4.1.0 released
|
| |
Greetings all.
This note announces the next major release of GNU Awk: version 4.1.0.
The following files may be retrieved from [link],
or via HTTP from [link]
-rw-r--r-- 1 3003 3002 490 May 10 09:50 gawk-4.1.0.tar.xz.sig
-rw-r--r-- 1 3003 3002 2049080 May 10 09:50 gawk-4.1.0.tar.xz... more »
|
|
records selection after a pattern..
|
| |
Hi,
I am extracting records from a print file after meeting a certain pattern(including the pattern record).
Here the records which are starting with space and number and the immediate record of the pattern.
1 actmodule 15:12:15
logged in
work finished 12 plmodule 11:11:16... more »
|
|
Finding line numbers of blank lines
|
| |
Sometimes I have files which are double-spaced and I use
awk 'length > 2' file
to strip away the blank lines.
Now I have some blank lines within a file and I would like to know the line numbers on which they occur. I thought that I could do something like:
awk '{length < 5} print NR' file... more »
|
|
Beta release of gawk 4.1.0 now available
|
| |
This note is to announce the BETA release of GNU Awk 4.1.0
It is available from:
[link]
This is a major release with significant new features.
As far as I can tell, the documentation and code have both hit the
freeze point.
So, why do a beta release? So that you, yes you, the end user, can see... more »
|
|
gawk can not find a file
|
| |
gawk can not find a file though it is existing :
gawk: F:\programs\sedawk\xerox_scrip ts\SAIB\SAIB_statement.awk:22: fatal: cannot open file `F:\programs\sedawk\xerox_scri pts\data_STMT2013MAR\02-165300 00043958601' for reading (No such file or directory)
I am running a batch file like this :
------------------------------ --------... more »
|
|
how do I read printf escape chars from a file?
|
| |
Maybe I just need another coffee but I cannot figure out how to expand escape chars for printing when I read my printf formatting string from a file:
$ cat file1
\n%s\n
$ awk '{printf $0, "foo"}' file1
\nfoo\n$
I was expecting to see the "\n"s turned into newlines! I tried
$ awk '{printf sprintf($0,""), "foo"}' file1... more »
|
|
gawk gensub - using backref sub-expressions in a function?
|
| |
In GNU awk I want to substitute all matching sub-strings by a calculated
value of each sub-expression, as outlined here:
buf = gensub (/([0-9]+)\/([0-9]+)/, func(\\1,\\2), "g", buf)
This does not work, it gives syntax errors at the backref positions; it
seems that backrefs are only available if part of a substitution string.... more »
|
|
Next pre-release of gawk 4.1 available
|
| |
Hello all.
[link]
Please try it out. Portability to different *nix systems should be
considerably improved, as well as other work.
Thanks,
Arnold
-- Aharon (Arnold) Robbins arnold AT skeeve DOT com
P.O. Box 354 Home Phone: +972 8 979-0381
Nof Ayalon... more »
|
|
|