Replace lines that have no digits with some constant word

1

I have a file with about 10000 lines like the examples shown below.  I need to replace the lines that do not contain any digits with some word; e.g., input.  How I can do this please?

Example:

The list I have is like this:

1234561
Winstead
Adesuwa1985
Trinity
Angela41
Anita
Tracey
sdojsodsd

I want results like this, where the lines that do not have any number are replaced with the word “input”:

1234561
input
Adesuwa1985
input
Angela41
input
input
input

banout chisp

Posted 2019-02-02T01:48:26.800

Reputation: 11

Question was closed 2019-02-02T10:41:40.020

4(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem.  What research have you done?  What have you learned?  What have you tried? … … … … … … … … … … … … Please do not respond in comments; [edit] your question to make it clearer and more complete. – Scott – 2019-02-02T02:22:13.307

2you are casting a broad net with your tags. Linux and windows? can you be more specific? – glenn jackman – 2019-02-02T03:12:43.377

What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)? – fixer1234 – 2019-02-02T06:33:05.570

I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented. – Tetsujin – 2019-02-02T08:06:35.297

Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done?  What have you learned?  What have you tried? … (Cont’d) – Scott – 2019-02-02T19:29:31.163

(Cont’d) … (3) As @glenn jackman pointed out, you have tagged the question both [linux] and [windows]. What do you want? – Scott – 2019-02-02T19:29:33.643

Say, your list is in column A, starting from A1, put the following formula in B1 =if(COUNT(FIND({0,1,2,3,4,5,6,7,8,9},A1))>0,A1,"input"), then, copy this formula all the way down in B up to where your data is there in A. This will give you the output you want in column B. Select entire column B, Copy that. Go to B1, click Menu - Paste - Value. your output is in B column. You can delete column A now. – VSRawat – 2019-02-06T17:16:57.843

@VSRawat: That would be a great answer if this were an Excel question. (I would point out a trivial variation: you could copy Column B, paste values into Column A, and then clear / delete Column B.) But this question was (somewhat ambiguously) tagged [command-line] and [notepad++]. – Scott – 2019-03-31T19:24:35.523

No answers