Questions tagged as 'grep'

7
answers

Search for all files that contain a text string in Linux

   Original question: Finding all files containing a text string on Linux from Nathan I'm trying to find a way to scan my entire Linux system for files with a specific text string. Just to be clear, I look for a text string in the file,...
asked by 21.12.2015 / 22:18
2
answers

Find text in several directories [duplicated]

I have a directory with a project: -rw-r--r-- 1 dani staff 18K Mar 4 06:54 LICENSE -rw-r--r-- 1 dani staff 1023 Mar 29 08:06 Makefile -rw-r--r-- 1 dani staff 129 Mar 2 15:33 README.md -rw-r--r-- 1 dani staff 528 Mar 14 16:05 TODO drwxr-...
asked by 31.03.2017 / 17:50
2
answers

Find an exact name in a text file with Bash

I am writing a Script in which one of the functions is to search in a text file DNI or Name that the user is asked for and when he finds them he will print the whole lines. The file has the format "DNI | Name" 2:Pepe 21:Julio 1:Marta...
asked by 10.04.2018 / 21:48
0
answers

Search and filter URL in a flat file (Bash) [closed]

I need to do the following: A script that searches in a flat file urls, and if part of the urls coincide, I printed them on the screen or I saved them in another flat file. For example, if I have a flat file with the following content: www....
asked by 02.11.2018 / 02:47
1
answer

grep in several bash lines [closed]

I want to find several lines within a file. If I have 3 lines I do not have any problems because I use the following to show the last line and the previous 2: grep -B 2 "lo que busco" But my question is: what happens when I want to look...
asked by 16.04.2018 / 06:19
0
answers

(grep -r) Search for a string in each pdf [closed]

In Android 4.4.4 I have the terminal.apk installed. How to recursively search a tablet for a specific string in each pdf file? At the beginning I was going to do it with qpython ( listdir , glob ), but I could not distin...
asked by 02.10.2016 / 01:26
1
answer

copy files containing words from a txt file [closed]

I need to copy files that contain words contained in a txt file. For example, the file I have contains: Balaena_mysticetus Balaenoptera_acutorostrata Bos_taurus Canis_familiaris Delphinapterus_leucas Equus_caballus Eschrichtius_robustus Homo_s...
asked by 14.05.2018 / 18:03
2
answers

Problems with bash script in CentOS - Reading of variables

I have to make a script written in bash to do access audits in mySQL. I already have the sentences that I have to use, but I do not know how to write the script correctly in order to collect variables and add them to a simple menu to make the...
asked by 20.11.2018 / 23:08