How can I filter out strings that contain no numbers within them?

user199046

Input:

apple
orang3
123rat
ratty
123
app7e

Output:

apple
ratty

I am trying awk '$1 ~/[[:alpha:]]/' file but this only removes cases like 123 that are fully numerical but I also want app7e and orang3 to be removed.

RomanPerekhrest

To namely fit the condition "contain no numbers":

Simple grep approach:

grep -v '[0-9]' file

Or the same with awk command:

awk '!/[0-9]/' file

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

If an Arraylist<String> also contains numbers, how can I filter them out?

How can I filter out numbers from an html table in R?

How can Make a selection to filter out the duplicates without grouping them? I want them all to display individually?

How can I pick out the odd numbers and even numbers from a given array and then store them in another array?

How can I filter for entries that do NOT contain a key-value pair within a nested array

How can I filter a list within a dataframe to contain only unique values?

Using Pandas in Python 3, how do I filter out repeat strings in a column within a dataframe?

How can I filter out words in an array that don't contain a certain value?

How can I add two Strings containing hexadecimal-numbers without converting them to int?

How can I compare a number with other numbers without writing them all out in C?

How can I add strings and print them?

Filter out rows that contain duplicate numbers

How to filter out rows of pandas df that contain values in 'set' type which contain certain strings?

How can I filter out objects where todays date falls within a range of a calculated date?

In Python, if I make a list of Optional values and then filter out None, how do I convince the type checker the list can't contain None?

How can I set up a byte stream out of a mix of strings and numbers?

How can i grab numbers out of strings when the length of the string changes?

How can I make a regex expression to filter out anything other than numbers and "." dots?

How can I filter an array of objects by an array o strings? (Should select all the object who contain the string in his key)

How can I partially match numbers to strings?

How can I convert an array of numbers to strings?

How do I find strings that contain two strings and replace one of them

How can I filter an array with an array of strings

How can I filter for a keyword in a list of strings?

How can I adjust this regex to filter out "

How can I filter out lines in a richtextbox?

Javascript array filter out numbers represented as strings

How can I verify that an array of strings contain a certain string?

How can I verify that an array of strings contain a certain string?