Category "grep"

How do I get only names of active plugins in Wordpress?

I am trying to to get list of active Wordpress plugins and for that I am using wp plugin list --status=active --allow-root command. That gives me putout like t

This command to pipe results and search for uppercase letters is not working. Getting "no such file or directory" error

I am doing an assignment and there is a part that says to put in this command that is supposed to pipe results and search for uppercase letters. Here is the com

Find patterns from one file in another file

I'm trying to find patterns from one file in another file. The pattern in file one looks something like this: ENSG00000203875.13 ENSG00000262691.1 ENSG000002549

Regex that matches comma separated list of 4 strings in bash

Im trying to write a regex function in bash where the first and third thing in the list are the same and the second and fourth thing in the list are the same. g

Regex match all word pairs

I am trying to get all the word pairs out of a piece of text. I have the following regular expression (\w+) +(\w+) that I run on a piece of text with no punctua

List files in which a word has disappeared

So, say I have two branches old_release (containing an old release) and new_release (containing a new release). In the old release there was a tool called cook,

If else script in bash using grep and awk

I am trying to make a script to check if the value snp (column $4 of the test file) is present in another file (map file). If so, print the value snp and the va

How can I find in a tsv file a value and 2 other values corresponding to the same row but in different columns USING GREP

So I have a tsv file that I opened in Numbers (Mac) and it has this aspect: sequence_id sequence v_call d_call j_call sequence alignment

Am I using grep properly?

I am new here and need help with a problem I can't seem to solve. I am working on my class project and analyzing a log file, so far I have been successful up to

Grep exclude count of occurence match between comments <!-- --> of curl body

I am very new to linux & bash script. I'm trying to read an xml file using curl command and count the number of occurrence of the word </entity> in it

grep positive/negative integer value only

I am looking to grep any positive/negative integers only and no decimals, or any other variation including a number. I have a testpart1.txt which has: This is a

How to make regex works with perl command and extract numbers from a file?

I'm trying to extract from a tab delimited file a number that i need to store in a variable. I'm approaching the problem with a regex that thanks to some resear

Github CLI - Grep for filtering by phrase in pull request body?

I’m using the Github CLI tool, which includes a command gh pr list that allows you to see all the open pull requests. The issue is that I only see a list

if() statement with paste0() or grep() in r

I made reproducible minimal example, but my real data is really huge ac_1 <-c(0.1, 0.3, 0.03, 0.03) ac_2 <-c(0.2, 0.4, 0.1, 0.008) ac_3 <-c(0.8, 0.043

Only one type of list may be specified?

So I have a bash script which is below, and whenever I try to execute it, it says only one type of list may be specified, any clue as to whats wrong with this c

Find matching words

I have a corpus file and the rules file. I am trying to find matching words where the word from rule appear in corpus. # cat corpus.txt this is a paragraph numb

Check for multi-line content in a file

I'm trying to check if a multi-line string exists in a file using common bash commands (grep, awk, ...). I want to have a file with a few lines, plain lines, n

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] ##

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

How to use sed/grep to extract text between two words?

I am trying to output a string that contains everything between two words of a string: input: "Here is a String" output: "is a" Using: sed -n '/Here/,/