How to grep for line-separated strings containing a comma in a text file?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a textfile with the following strings with a comma in them:
John,Smith
Jane,Doe
How can I grep * using this textfile? I've tried to use grep -xFf textfile *
but I don't get any results even if there are files that contain these strings.
a sample datafile within * contains this line:1231920383939,'unix:///run/John,Smith',''
input: grep -xFf textfile *
output: (blank)
grep
add a comment |Â
up vote
0
down vote
favorite
I have a textfile with the following strings with a comma in them:
John,Smith
Jane,Doe
How can I grep * using this textfile? I've tried to use grep -xFf textfile *
but I don't get any results even if there are files that contain these strings.
a sample datafile within * contains this line:1231920383939,'unix:///run/John,Smith',''
input: grep -xFf textfile *
output: (blank)
grep
1
Can't reproduce here; when I create a sample text file and sample input files,grep -xFf samplefile *
, I get back all the files I'm expecting. Do the data files contain one of those textfile strings on their own line? (That's what -x requires)
â Jeff Schaller
12 mins ago
The data files contain text in this format: 1539198827392,'John,Smith','' if I usegrep -xFf samplefile *
I can't get that line for some reason
â kouichi
8 mins ago
Edit the sample input and output into your question-- comments are inadequate.
â Jeff Schaller
6 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a textfile with the following strings with a comma in them:
John,Smith
Jane,Doe
How can I grep * using this textfile? I've tried to use grep -xFf textfile *
but I don't get any results even if there are files that contain these strings.
a sample datafile within * contains this line:1231920383939,'unix:///run/John,Smith',''
input: grep -xFf textfile *
output: (blank)
grep
I have a textfile with the following strings with a comma in them:
John,Smith
Jane,Doe
How can I grep * using this textfile? I've tried to use grep -xFf textfile *
but I don't get any results even if there are files that contain these strings.
a sample datafile within * contains this line:1231920383939,'unix:///run/John,Smith',''
input: grep -xFf textfile *
output: (blank)
grep
grep
edited 2 mins ago
asked 20 mins ago
kouichi
315
315
1
Can't reproduce here; when I create a sample text file and sample input files,grep -xFf samplefile *
, I get back all the files I'm expecting. Do the data files contain one of those textfile strings on their own line? (That's what -x requires)
â Jeff Schaller
12 mins ago
The data files contain text in this format: 1539198827392,'John,Smith','' if I usegrep -xFf samplefile *
I can't get that line for some reason
â kouichi
8 mins ago
Edit the sample input and output into your question-- comments are inadequate.
â Jeff Schaller
6 mins ago
add a comment |Â
1
Can't reproduce here; when I create a sample text file and sample input files,grep -xFf samplefile *
, I get back all the files I'm expecting. Do the data files contain one of those textfile strings on their own line? (That's what -x requires)
â Jeff Schaller
12 mins ago
The data files contain text in this format: 1539198827392,'John,Smith','' if I usegrep -xFf samplefile *
I can't get that line for some reason
â kouichi
8 mins ago
Edit the sample input and output into your question-- comments are inadequate.
â Jeff Schaller
6 mins ago
1
1
Can't reproduce here; when I create a sample text file and sample input files,
grep -xFf samplefile *
, I get back all the files I'm expecting. Do the data files contain one of those textfile strings on their own line? (That's what -x requires)â Jeff Schaller
12 mins ago
Can't reproduce here; when I create a sample text file and sample input files,
grep -xFf samplefile *
, I get back all the files I'm expecting. Do the data files contain one of those textfile strings on their own line? (That's what -x requires)â Jeff Schaller
12 mins ago
The data files contain text in this format: 1539198827392,'John,Smith','' if I use
grep -xFf samplefile *
I can't get that line for some reasonâ kouichi
8 mins ago
The data files contain text in this format: 1539198827392,'John,Smith','' if I use
grep -xFf samplefile *
I can't get that line for some reasonâ kouichi
8 mins ago
Edit the sample input and output into your question-- comments are inadequate.
â Jeff Schaller
6 mins ago
Edit the sample input and output into your question-- comments are inadequate.
â Jeff Schaller
6 mins ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478775%2fhow-to-grep-for-line-separated-strings-containing-a-comma-in-a-text-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Can't reproduce here; when I create a sample text file and sample input files,
grep -xFf samplefile *
, I get back all the files I'm expecting. Do the data files contain one of those textfile strings on their own line? (That's what -x requires)â Jeff Schaller
12 mins ago
The data files contain text in this format: 1539198827392,'John,Smith','' if I use
grep -xFf samplefile *
I can't get that line for some reasonâ kouichi
8 mins ago
Edit the sample input and output into your question-- comments are inadequate.
â Jeff Schaller
6 mins ago