Skip to main content

Questions tagged [awk]

AWK is an interpreted programming language designed for text processing and typically used as a data extraction and reporting tool.

5 votes
1 answer
173 views

The following script is to convert Markdown files to something closer to my aesthetical expectations. It is not assumed to be bulletproof accurate and I don't mind to slightly adjust the output ...
jsx97's user avatar
  • 207
6 votes
4 answers
576 views

I would like to request a review of an Awk program I have written. This script meets an immediate business need and, ideally, serves as a coding style example for new hires (who may not yet be ...
Thure Dührsen's user avatar
4 votes
1 answer
242 views

I've made an awk script that does the same operation and has the same parameters as Python's pandas.DataFrame.pivot, for 2D tables. It reshapes a table from "...
user avatar
3 votes
2 answers
222 views

I have a sample svg file from the graphics program Inkscape. My objective is to collect every third pair from a very long line of floating point numbers. That seems simple enough. The larger objective ...
Bryan-StackExchange's user avatar
3 votes
1 answer
81 views

Objective I'd like to confirm if there is a more efficient approach for the working script below, which splits column data in my tsv files. I suspect this can be achieved with awk or maybe sed but my ...
El_Birdo's user avatar
  • 131
4 votes
1 answer
160 views

A single string consisting of comma-separated pairs in the format <key>=<value>, like ...
Amaterasu's user avatar
  • 195
1 vote
1 answer
73 views

I have a file of the form - >SDF123.1 blah blah ATCTCTGGAAACTCGGTGAAAGAGAGTAT AGTGATGAGGATGAGTGAG... >SBF123.1 blah blah ATCTCTGGAAACTCGGTGAAAGAGAGTAT AGTGATGAGGATGAGTGAG.... And I want to ...
user1995's user avatar
  • 135
3 votes
0 answers
102 views

This script gathers domains listed from sources in this JSON file and compiles them into one text file. Text files that have a similar key under the whitelists ...
T145's user avatar
  • 3,159
3 votes
1 answer
171 views

The task is to get the most recent login time of the day for each user. Then send such a result to an API. The log file (file.log) looks like the following (only ...
Marc's user avatar
  • 5,734
2 votes
0 answers
71 views

I am working on the improvement of the bash-awk workflow designed for the analysis of data in multiple-colums format. The script uses AWK code (which extract numbers from selected columns of the input....
Hot JAMS's user avatar
  • 149
2 votes
1 answer
126 views

As a part of my bash routine I am printing some message in terminal regarding status of the workflow. The message in splited into two parts (part 1: begining of the task, part 2: status of its ...
Hot JAMS's user avatar
  • 149
1 vote
1 answer
169 views

I try to create compare script using awk and another command and running successful. But I think the script I create it's to long. Is there anyone can shorten my script below ? After plan A ...
Ario's user avatar
  • 21
2 votes
0 answers
74 views

I had a sample file with a long string >50M like this. ...
hey0god's user avatar
  • 21
2 votes
1 answer
412 views

I thought it would be fun to write a simple and small bash script which randomly chooses a wallpaper from a given directory of a set of wallpaper images. The code is as follows. ...
user avatar
1 vote
1 answer
122 views

I have the code below, which works successfully, and is used to parse, clean log files (very large in size) and output into smaller sized files. Output filename is the first 2 characters of each line. ...
rogerwhite's user avatar

15 30 50 per page