Questions tagged [mawk]

Mawk is an implementation and fast processor of the AWK programming language.

Mawk is an implementation and fast processor of the AWK programming language. It can be compiled on many POSIX-like systems.

Binary mawk packages are available for many Linux distributions and for Mac OS (e.g., in MacPorts). Mawk is usually installed in addition to the default GNU/awk processor. The provided mawk command can be used as substitute for the default awk command to run AWK scripts. Some Linux distributions even symlink the default awk command to the mawk binary.

The main reason to use mawk instead of awk is performance [2,3,4].

20 questions
0
votes
1 answer

Problem with awk and (maybe) null characters

I have this file, which "may be" a binary file: DATA FIELDINFO Cloud_Mask_QA {{{ rank: 2 type: 20 dims: Cell_Along_Swath_1km 2030, Cell_Across_Swath_1km 1354, data: ... (2748620) (0,0) ^@, ^@, ^@, ^@, ^@, ^@, ^@, ^@, ^@, ^@, ^@, ^@,…
Javi_VM
  • 505
  • 2
  • 10
0
votes
2 answers

Processing text in bash - extracting the volume of a program from pactl sink-inputs output

Looking for a way to extract the volume from pactl list sink-inputs Output example: Sink Input #67 Driver: protocol-native.c Owner Module: 12 Client: 32 Sink: 0 Sample Specification: s16le 2ch 44100Hz …
Gray K
  • 67
  • 7
0
votes
2 answers

gsub for substituting translations not working

I have a dictionary dict with records separated by ":" and data fields by new lines, for example: :one 1 :two 2 :three 3 :four 4 Now I want awk to substitute all occurrences of each record in the input file,…
Moeder
  • 75
  • 5
0
votes
1 answer

Why calling the same function many times with different arguments is slower

I have put up a simple bash script that generates 4 words random passphrases from a list of thousands of words. Now I am not sure if it is really secure or efficient being for my personal use, you guys let me know if you think about any…
Jeanmichel Cote
  • 531
  • 1
  • 5
  • 19
-1
votes
1 answer

Need to remove duplicate lines using mawk (specifically)

I have a gawk command that works fine. But I have a machine with mawk installed and when I try to install gawk it complains about broken dependencies. I would like to change this line to mawk syntax. awk -F '[|]{3}' 'BEGIN {OFS="|||"} !seen[$4]++…
Mallik Kumar
  • 540
  • 1
  • 5
  • 28
1
2