Questions tagged as 'grep'

2
answers

What is the equivalent of the grep command in Windows?

In Linux, when I want to filter by a term when a command will generate a giant list, I use the command grep . For example: ls | grep "termo" However, in Windows there is no command grep . What would be the equivalent of...
asked by 27.06.2017 / 15:07
1
answer

Similarity of elements in different vectors

I have two vectors: A <- c("RS", "DF", "CE") B <- c("Porto Alegre - RS", "Brasília - DF", "Fortaleza - CE", "Porto Alegre - RS", "Acre - AC", "Recife - PE") and a function: f <- function(a,b) { lista <- grep(a,b, fixed = FA...
asked by 20.01.2017 / 20:36
1
answer

Get Commits with Key Words

I'm trying to mine some data from Git, I need to know how many commits the X file is in, and if I have any keyword in a list. I am using the following command: git log --all --grep fix --follow Freak.php Currently it only searches for the k...
asked by 03.10.2017 / 19:16
2
answers

How to print global IPv6 using grep and awk?

There are already a few days that I am searching the Internet for such a response but I have not gotten any so far. I'm trying to figure out ifconfig's Global IPv6 to be used on MOTD on Ubuntu. With IPv4 it was quite easy to do this with this...
asked by 16.02.2017 / 15:34
1
answer

Creating a file from a list and several different files

I have a list of names and several different files that may or may not contain all the names in the list and a value assigned to the names. I need to compare the values of all these each file to the names in the list. These are the kind of txt f...
asked by 05.05.2017 / 22:45
2
answers

Linux - Edit multiple files using another file as source

I have a file (listname.txt) with multiple names, one per line. I need to edit or remove all names that are in listanome.txt from various other files With grep I guess which files should be dictated, but are many. grep -Ff lista...
asked by 18.07.2018 / 20:03
2
answers

How to search for old files in Linux? [closed]

I need to use the tail -f command to search past logs . I know there are tail -f | grep "" . But I do not know how to look for the old ones with the parameter I want. Can anyone help me?     
asked by 13.02.2015 / 18:31
1
answer

Redirect the standard HCIDUMP output using GREP to a file

I'm using a shell script to do HCIDUMP and using some filters to write to a file. With the following command, the destination file is empty. hcidump -a l2cap | grep -v -e 'CAP' -e 'HCI' > onlystringsrecieved.txt Using the same command wi...
asked by 26.03.2017 / 05:48
0
answers

How do I get a specific value with the grep command?

I have a text file with the following content, summarizing: { "track": 1, "name": " 127 O verbo ", ... " }, { "track": 2, "name": " 128 A luz ", ... }, I would like to just get the value of name which in the example a...
asked by 02.03.2018 / 16:25
1
answer

execute grep command in C language and return result

void main() { char comando[2000]; char resultado[500] sprintf(comando, "grep '[0-9]{50}-' input.txt); resultado = system(comando); printf("%s\n",resultado); } I need only 1 match, and return the value in result, the above...
asked by 19.12.2017 / 15:04