Category "awk"

Default field separator for awk

Is the default separator only space for awk?

How to select two columns from awk and print if they do not match

I need to select two MSISDN values from OMO account Migration logs and print the ones that do not match. [2019-03-11 04:15:08 INFO-SUBAPP ESBRestClient:117] ##

Finding second highest salary using awk

I have a file as follows 1 rob hr 10000 2 charls it 20000 4 kk Fin 30000 5 km it 30000 6 kl it 30000 7 mark hr 10000 8 kc it 30000 9 dc fin 40000 10 m

How to Skip 1st line of file - awk

I am beginner to awk. I have created one file which contains employee information. There are employees in different departments. And i wanna count that how many

Print the missing number in a unique sequential list with an arbitrary starting range or starting from 1

This question is similar to How can I find the missing integers in a unique and sequential list (one per line) in a unix terminal?. The difference being is that

FFMPEG build on Windows using MSVC - make fails

I am trying to build FFMPEG on Windows with MSVC. I am following this guide. I have managed to setup the environment in order to configure successfully, but mak

Parsing HTML on the command line; How to capture text in <strong></strong>?

I'm trying to grab data from HTML output that looks like this: <strong>Target1NoSpaces</strong><span class="creator"> .... <strong>Targ

awk search for string and set exit code if it exists

I want to check if a line exists between two addresses and return an exit code 0 if it exists and 1 if it does not. I think I've got one possible example workin

How to extract last part of string in bash?

I have this variable: A="Some variable has value abc.123" I need to extract this value i.e abc.123. Is this possible in bash?

Comparing two columns in two files using awk

I'm trying to compare two different files, let's say "file1" and "file2", in this way. If fields $2 and $3 are the same in both files, print $0 of file2. Here's

How to split a delimited string into an array in awk?

How to split the string when it contains pipe symbols | in it. I want to split them to be in array. I tried echo "12:23:11" | awk '{split($0,a,":"); print a[3