Show only lines which contain numbers [closed]

Clash Royale CLAN TAG#URR8PPP
I have a file with the following lines:
irakli1
iraklikairakli
ikarkalsi1
iarksldisrii3
irakli
and I want to show only the lines which contain numbers.
I tried this but it is not working:
sed -n '/a/'p irakli.txt
sed grep find
closed as unclear what you're asking by G-Man, Jeff Schaller, Stephen Harris, JigglyNaga, RalfFriedl Jan 3 at 14:09
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I have a file with the following lines:
irakli1
iraklikairakli
ikarkalsi1
iarksldisrii3
irakli
and I want to show only the lines which contain numbers.
I tried this but it is not working:
sed -n '/a/'p irakli.txt
sed grep find
closed as unclear what you're asking by G-Man, Jeff Schaller, Stephen Harris, JigglyNaga, RalfFriedl Jan 3 at 14:09
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Do you mean that you only want to print the lines that contains a number?
– Nasir Riley
Dec 30 '18 at 22:04
Please add your desired output for that sample input to your question.
– Cyrus
Dec 31 '18 at 8:50
add a comment |
I have a file with the following lines:
irakli1
iraklikairakli
ikarkalsi1
iarksldisrii3
irakli
and I want to show only the lines which contain numbers.
I tried this but it is not working:
sed -n '/a/'p irakli.txt
sed grep find
I have a file with the following lines:
irakli1
iraklikairakli
ikarkalsi1
iarksldisrii3
irakli
and I want to show only the lines which contain numbers.
I tried this but it is not working:
sed -n '/a/'p irakli.txt
sed grep find
sed grep find
edited Jan 1 at 8:51
valiano
200111
200111
asked Dec 30 '18 at 21:54
IrakliIrakli
143
143
closed as unclear what you're asking by G-Man, Jeff Schaller, Stephen Harris, JigglyNaga, RalfFriedl Jan 3 at 14:09
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by G-Man, Jeff Schaller, Stephen Harris, JigglyNaga, RalfFriedl Jan 3 at 14:09
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Do you mean that you only want to print the lines that contains a number?
– Nasir Riley
Dec 30 '18 at 22:04
Please add your desired output for that sample input to your question.
– Cyrus
Dec 31 '18 at 8:50
add a comment |
1
Do you mean that you only want to print the lines that contains a number?
– Nasir Riley
Dec 30 '18 at 22:04
Please add your desired output for that sample input to your question.
– Cyrus
Dec 31 '18 at 8:50
1
1
Do you mean that you only want to print the lines that contains a number?
– Nasir Riley
Dec 30 '18 at 22:04
Do you mean that you only want to print the lines that contains a number?
– Nasir Riley
Dec 30 '18 at 22:04
Please add your desired output for that sample input to your question.
– Cyrus
Dec 31 '18 at 8:50
Please add your desired output for that sample input to your question.
– Cyrus
Dec 31 '18 at 8:50
add a comment |
1 Answer
1
active
oldest
votes
A simple one with grep
grep '[0-9]' irakli.txt
with the file snippet you supplied, you would end up with
irakli1
ikarkalsi1
iarksldisrii3
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
5
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
1
@Irakli, do you meanresult=$(grep '[0-9] irakli.txt)
– glenn jackman
Dec 31 '18 at 14:16
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
A simple one with grep
grep '[0-9]' irakli.txt
with the file snippet you supplied, you would end up with
irakli1
ikarkalsi1
iarksldisrii3
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
5
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
1
@Irakli, do you meanresult=$(grep '[0-9] irakli.txt)
– glenn jackman
Dec 31 '18 at 14:16
add a comment |
A simple one with grep
grep '[0-9]' irakli.txt
with the file snippet you supplied, you would end up with
irakli1
ikarkalsi1
iarksldisrii3
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
5
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
1
@Irakli, do you meanresult=$(grep '[0-9] irakli.txt)
– glenn jackman
Dec 31 '18 at 14:16
add a comment |
A simple one with grep
grep '[0-9]' irakli.txt
with the file snippet you supplied, you would end up with
irakli1
ikarkalsi1
iarksldisrii3
A simple one with grep
grep '[0-9]' irakli.txt
with the file snippet you supplied, you would end up with
irakli1
ikarkalsi1
iarksldisrii3
answered Dec 30 '18 at 22:04
TorinTorin
37517
37517
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
5
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
1
@Irakli, do you meanresult=$(grep '[0-9] irakli.txt)
– glenn jackman
Dec 31 '18 at 14:16
add a comment |
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
5
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
1
@Irakli, do you meanresult=$(grep '[0-9] irakli.txt)
– glenn jackman
Dec 31 '18 at 14:16
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
can you please time how to Fill in results? for example result = name i want to write eman
– Irakli
Dec 30 '18 at 22:07
5
5
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
Sorry, I don't quite understand what you are asking. Could you rephrase the question?
– Torin
Dec 30 '18 at 22:12
1
1
@Irakli, do you mean
result=$(grep '[0-9] irakli.txt)– glenn jackman
Dec 31 '18 at 14:16
@Irakli, do you mean
result=$(grep '[0-9] irakli.txt)– glenn jackman
Dec 31 '18 at 14:16
add a comment |
1
Do you mean that you only want to print the lines that contains a number?
– Nasir Riley
Dec 30 '18 at 22:04
Please add your desired output for that sample input to your question.
– Cyrus
Dec 31 '18 at 8:50