Skip to main content

Question list filters

Filter by
Sorted by
Tagged with
Score of 0
1 answer
140 views

using gawk under windows cmd.exe with the following as the awk program { printf "%s,", $0 } overwrites the first letter of $0 with , for any input you care to try. I'm expecting to see $0 ...
Score of 9
10 answers
936 views

I have a file where a pattern repeats a various number of times between lines that are relevant. I want to keep only the last of the lines that repeat in each occurrence of the repetition. This is ...
Score of -8
4 answers
224 views

I have a file - around 75k lines - with this content: 2022-02-09 15:00 Free: 123 2023-11-10 16:00 Free: 170 2024-04-28 17:00 Free: 105 2025-12-19 18:00 Free: 3001 2026-07-08 19:00 Free: 2576 Each ...
Score of 1
2 answers
88 views

I have a text file consisting of "text block", the individual blocks are separated from each other by one or more newlines. I wanted to count the number of blocks. My first attempt went like ...
Score of 4
3 answers
205 views

the problem is that awk transforms any roundable float into integers: 1.000 -> 1 for example: cat <<EOF | awk -v CONVFMT=%.06f '{$1=$1*2; print}' 0.000 some stuff 1.000 other different ...
Score of 0
2 answers
127 views

I came up with this: awk '{print}/SPECIAL_LINE/{exit}' file.txt | head -n -1 Any other suggestions? Maybe it could be more elegant. [UPDATE] Thank you very much everyone! I'd like to point out my ...
Score of 4
3 answers
340 views

I have a text file (data.txt) lala=something dada=somethingelse stuffwithoutequalsign otherstuffwithoutequalsign I am parsing it in R/Rstudio/Win11 using system call to awk (gawk 5.3.0 installed), ...
Score of 3
6 answers
329 views

I would like to fuse a huge number of big (~1GiB) text files in VCF (Variant Call) Format. The operation requires to read all the headers first (in order to generate and output a new one) and then ...
Score of 8
7 answers
654 views

Here is the output of my curl command (print headers only): HTTP/1.1 200 OK Server: CacheHTTPd v1.0 Date: Thu, 08 Jan 2026 19:21:11 +0000 Content-Type: application/octet-stream Content-Length: ...
Score of 8
4 answers
244 views

Given the following text: Param1 : Value1 Param2 : Value2 Param3 : Value3a : Value3b : Value3c Param4 : Value4 I would like to obtain the following Ansible result dict of strings or ...
Score of 1
2 answers
139 views

I have an input as the following. 0:4:1 untagged 192.168.20.11 255.255.255.0 0.0.0.0 0 0.0.0.0 3205 - 10 192.168.10.11 255.255.255.0 0.0.0.0 0 0.0.0.0 3205 - ...
Score of 0
2 answers
77 views

I'm trying to get all the IP addresses with response 404's from our Apache web server log file. This is what I have: awk '($7 == "404") {print $1,$5}' /var/log/404.log | sort -n > ip.list ...
Score of 0
2 answers
103 views

The idea of Persistent-Memory gawk is fabulous because it improves the performance, size, and clarity of many scripts on static and reference data. However, I have a significant problem in adopting ...
Score of 6
4 answers
268 views

I was working on a one-liner to subtract a constant value (e.g. 100 in this case) from a specific column using awk. So far I can manage to get to where I can print the last iteration only – which ...
Score of 6
3 answers
328 views

Most awk implementations I have tried (gawk, mawk, original-awk, bsd awk) allow the form: a || b = c The exception seems to be busybox which returns a syntax error unless parentheses are used: $ ...

15 30 50 per page
1
2 3 4 5
2293