S
S
shellnet2022-02-08 02:11:39
linux
shellnet, 2022-02-08 02:11:39

How to search for occurrences from a list of phrases in linux?

Let's say there are two files.
In one file, a list of words.
The second has a large list of strings.
How in bash to implement a search for occurrences from a list of words in the first file without having to insert each word into grep by hand?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2022-02-08
@warlinx

while read; do grep "$REPLY";done<file1

S
SOTVM, 2022-02-08
@sotvm

awk
_
_
_
_

_
_
_
_
_
_ may not be

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question