How to prepend a string to only the lines of text which are numbersAutomatically doubling the value of numbers in a string in multiple filesHow can I count lines of differently named files, and write the outcome to a csv file?Multiplying numbers in file by random numbersHow to get line from a file using line number and edit it easily?Only in lines with a specific string replace another stringDelete all lines from middle of a line matching a string until the second string match is foundInsert a line of text after the line containing the last occurence of a specified wordDelete ranges of lines, but skip the comments which come in between the linesHow to recursively go through all text files in a directory to fetch the desired line, and write these lines to same text file?grep and sed only the numbers from a text file's line
Is GOCE a satellite or aircraft?
Will tsunami waves travel forever if there was no land?
Feels like I am getting dragged in office politics
What is the difference between `a[bc]d` (brackets) and `ab,cd` (braces)?
How to verbalise code in Mathematica?
Toggle Overlays shortcut?
Subtleties of choosing the sequence of tenses in Russian
Why do computer-science majors learn calculus?
When did stoichiometry begin to be taught in U.S. high schools?
Were there two appearances of Stan Lee?
Why does Bran Stark feel that Jon Snow "needs to know" about his lineage?
Lock in SQL Server and Oracle
If Earth is tilted, why is Polaris always above the same spot?
Do generators produce a fixed load?
Why do TACANs not have a symbol for compulsory reporting?
How does a Swashbuckler rogue "fight with two weapons while safely darting away"?
When and why did journal article titles become descriptive, rather than creatively allusive?
What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?
Is it possible to measure lightning discharges as Nikola Tesla?
Is thermodynamics only applicable to systems in equilibrium?
How to creep the reader out with what seems like a normal person?
Is creating your own "experiment" considered cheating during a physics exam?
Please, smoke with good manners
How to back up a running remote server?
How to prepend a string to only the lines of text which are numbers
Automatically doubling the value of numbers in a string in multiple filesHow can I count lines of differently named files, and write the outcome to a csv file?Multiplying numbers in file by random numbersHow to get line from a file using line number and edit it easily?Only in lines with a specific string replace another stringDelete all lines from middle of a line matching a string until the second string match is foundInsert a line of text after the line containing the last occurence of a specified wordDelete ranges of lines, but skip the comments which come in between the linesHow to recursively go through all text files in a directory to fetch the desired line, and write these lines to same text file?grep and sed only the numbers from a text file's line
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Suppose I have 6 lines of text.
Series
Of
Word
73914
Again
Word
I need to prepend a string to the beginning of lines that contain ONLY numbers. Say I insert number-
Series
Of
Word
number-73914
Again
Word
Currently I run two commands to achieve the desired result. I wonder if there is a more efficient method.
Note: There are 1000+ lines, so preferably this applies to all lines ( I already state it ).
command-line text-processing sed awk
add a comment |
Suppose I have 6 lines of text.
Series
Of
Word
73914
Again
Word
I need to prepend a string to the beginning of lines that contain ONLY numbers. Say I insert number-
Series
Of
Word
number-73914
Again
Word
Currently I run two commands to achieve the desired result. I wonder if there is a more efficient method.
Note: There are 1000+ lines, so preferably this applies to all lines ( I already state it ).
command-line text-processing sed awk
What do you want to do with a line like1st word 2nd word
?
– glenn jackman
Mar 29 at 18:00
And do you want only lines that are entirely a number or that start with a number? E.g. would you want123abc
to be changed tonumber-123abc
or not?
– Kevin
Mar 29 at 19:57
add a comment |
Suppose I have 6 lines of text.
Series
Of
Word
73914
Again
Word
I need to prepend a string to the beginning of lines that contain ONLY numbers. Say I insert number-
Series
Of
Word
number-73914
Again
Word
Currently I run two commands to achieve the desired result. I wonder if there is a more efficient method.
Note: There are 1000+ lines, so preferably this applies to all lines ( I already state it ).
command-line text-processing sed awk
Suppose I have 6 lines of text.
Series
Of
Word
73914
Again
Word
I need to prepend a string to the beginning of lines that contain ONLY numbers. Say I insert number-
Series
Of
Word
number-73914
Again
Word
Currently I run two commands to achieve the desired result. I wonder if there is a more efficient method.
Note: There are 1000+ lines, so preferably this applies to all lines ( I already state it ).
command-line text-processing sed awk
command-line text-processing sed awk
edited Mar 29 at 9:21
Martin Thornton
2,56361830
2,56361830
asked Mar 29 at 3:24
JimJim
8,91122346
8,91122346
What do you want to do with a line like1st word 2nd word
?
– glenn jackman
Mar 29 at 18:00
And do you want only lines that are entirely a number or that start with a number? E.g. would you want123abc
to be changed tonumber-123abc
or not?
– Kevin
Mar 29 at 19:57
add a comment |
What do you want to do with a line like1st word 2nd word
?
– glenn jackman
Mar 29 at 18:00
And do you want only lines that are entirely a number or that start with a number? E.g. would you want123abc
to be changed tonumber-123abc
or not?
– Kevin
Mar 29 at 19:57
What do you want to do with a line like
1st word 2nd word
?– glenn jackman
Mar 29 at 18:00
What do you want to do with a line like
1st word 2nd word
?– glenn jackman
Mar 29 at 18:00
And do you want only lines that are entirely a number or that start with a number? E.g. would you want
123abc
to be changed to number-123abc
or not?– Kevin
Mar 29 at 19:57
And do you want only lines that are entirely a number or that start with a number? E.g. would you want
123abc
to be changed to number-123abc
or not?– Kevin
Mar 29 at 19:57
add a comment |
4 Answers
4
active
oldest
votes
sed
can do that:
$ sed 's/^[[:digit:]]*$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
In case we want to account for empty lines, we'd use +
and -r
option:
$ sed -r 's/^[[:digit:]]+$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
Once you verify everything is proper, you can use -i
option to edit the file itself, i.e. sed -i ...
. Otherwise, you can always make a copy of the file with sed 's/^[[:digit:]]*$/number-&/' input.txt > output.txt
Note that this assumes consistent file format, with no leading whitespaces or trailing whitespaces on each line.
And here's Python as extra:
$ python3 -c 'import sys; print("n".join([ "number-" + i.strip() if i.strip().isnumeric() else i.strip() for i in sys.stdin]))' < input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
2
I often use the "substitute if match" variant for things like this/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
add a comment |
One way using awk:
awk '/^[0-9]+$/$0="number-"$0;1' file
I also seekawk
solution, thanks ! 1+
– Jim
Mar 29 at 9:42
add a comment |
lines that contain ONLY numbers
It's unclear whether you mean numbers or just 0-9. Here's a Perl one-liner that picks out the likes of 123, 3.14 and 1e-12 while ignoring various representations of infinity and not-a-number:
$ perl -MScalar::Util -ne 'chomp; if (!(m/^s/ || m/^[+-]?inf(?:inity)?$/i || m/^nan$/i) && Scalar::Util::looks_like_number($_)) print("N:"); print("$_n");' <x
a
N:123
N:+1
N:-1
1
b
1a
N:3.14
c
3.1415926 is an approximation of pi
N:1e-12
inf
Inf
Infinity
Infinity +1 sword
+Infinity
-infinity
NaN
1/2
I changed the prefix to "N:" simply because "number--1" looks a bit rubbish. Note that this treats " 1", for example, as not numeric. If that is undesirable behaviour, do not include the "m/^s/" test for leading whitespace.
If you mean "0-9", Sergiy's sed solution above is fine.
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
add a comment |
You can try this
$cat input.txt
Series
Of
Word
73914
Again
Word
$awk ' if($1 ~/[0-9]/) printf "number - %sn",$1; else print $1 ' input.txt
Series
Of
Word
number - 73914
Again
Word
Usingif
statement, nice ! Thank you :D
– Jim
Mar 29 at 9:42
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129567%2fhow-to-prepend-a-string-to-only-the-lines-of-text-which-are-numbers%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
sed
can do that:
$ sed 's/^[[:digit:]]*$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
In case we want to account for empty lines, we'd use +
and -r
option:
$ sed -r 's/^[[:digit:]]+$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
Once you verify everything is proper, you can use -i
option to edit the file itself, i.e. sed -i ...
. Otherwise, you can always make a copy of the file with sed 's/^[[:digit:]]*$/number-&/' input.txt > output.txt
Note that this assumes consistent file format, with no leading whitespaces or trailing whitespaces on each line.
And here's Python as extra:
$ python3 -c 'import sys; print("n".join([ "number-" + i.strip() if i.strip().isnumeric() else i.strip() for i in sys.stdin]))' < input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
2
I often use the "substitute if match" variant for things like this/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
add a comment |
sed
can do that:
$ sed 's/^[[:digit:]]*$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
In case we want to account for empty lines, we'd use +
and -r
option:
$ sed -r 's/^[[:digit:]]+$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
Once you verify everything is proper, you can use -i
option to edit the file itself, i.e. sed -i ...
. Otherwise, you can always make a copy of the file with sed 's/^[[:digit:]]*$/number-&/' input.txt > output.txt
Note that this assumes consistent file format, with no leading whitespaces or trailing whitespaces on each line.
And here's Python as extra:
$ python3 -c 'import sys; print("n".join([ "number-" + i.strip() if i.strip().isnumeric() else i.strip() for i in sys.stdin]))' < input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
2
I often use the "substitute if match" variant for things like this/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
add a comment |
sed
can do that:
$ sed 's/^[[:digit:]]*$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
In case we want to account for empty lines, we'd use +
and -r
option:
$ sed -r 's/^[[:digit:]]+$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
Once you verify everything is proper, you can use -i
option to edit the file itself, i.e. sed -i ...
. Otherwise, you can always make a copy of the file with sed 's/^[[:digit:]]*$/number-&/' input.txt > output.txt
Note that this assumes consistent file format, with no leading whitespaces or trailing whitespaces on each line.
And here's Python as extra:
$ python3 -c 'import sys; print("n".join([ "number-" + i.strip() if i.strip().isnumeric() else i.strip() for i in sys.stdin]))' < input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
sed
can do that:
$ sed 's/^[[:digit:]]*$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
In case we want to account for empty lines, we'd use +
and -r
option:
$ sed -r 's/^[[:digit:]]+$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
Once you verify everything is proper, you can use -i
option to edit the file itself, i.e. sed -i ...
. Otherwise, you can always make a copy of the file with sed 's/^[[:digit:]]*$/number-&/' input.txt > output.txt
Note that this assumes consistent file format, with no leading whitespaces or trailing whitespaces on each line.
And here's Python as extra:
$ python3 -c 'import sys; print("n".join([ "number-" + i.strip() if i.strip().isnumeric() else i.strip() for i in sys.stdin]))' < input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty
line above is empty
edited Mar 29 at 7:07
answered Mar 29 at 7:00
Sergiy KolodyazhnyySergiy Kolodyazhnyy
75.9k9158333
75.9k9158333
2
I often use the "substitute if match" variant for things like this/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
add a comment |
2
I often use the "substitute if match" variant for things like this/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
2
2
I often use the "substitute if match" variant for things like this
/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
I often use the "substitute if match" variant for things like this
/^[[:digit:]]+$/ s/^/number-/'
– steeldriver
Mar 29 at 7:29
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
Thanks for the complete instruction, I'm a total noob when it comes to text processing :-O
– Jim
Mar 29 at 9:41
add a comment |
One way using awk:
awk '/^[0-9]+$/$0="number-"$0;1' file
I also seekawk
solution, thanks ! 1+
– Jim
Mar 29 at 9:42
add a comment |
One way using awk:
awk '/^[0-9]+$/$0="number-"$0;1' file
I also seekawk
solution, thanks ! 1+
– Jim
Mar 29 at 9:42
add a comment |
One way using awk:
awk '/^[0-9]+$/$0="number-"$0;1' file
One way using awk:
awk '/^[0-9]+$/$0="number-"$0;1' file
answered Mar 29 at 7:04
GuruGuru
52838
52838
I also seekawk
solution, thanks ! 1+
– Jim
Mar 29 at 9:42
add a comment |
I also seekawk
solution, thanks ! 1+
– Jim
Mar 29 at 9:42
I also seek
awk
solution, thanks ! 1+– Jim
Mar 29 at 9:42
I also seek
awk
solution, thanks ! 1+– Jim
Mar 29 at 9:42
add a comment |
lines that contain ONLY numbers
It's unclear whether you mean numbers or just 0-9. Here's a Perl one-liner that picks out the likes of 123, 3.14 and 1e-12 while ignoring various representations of infinity and not-a-number:
$ perl -MScalar::Util -ne 'chomp; if (!(m/^s/ || m/^[+-]?inf(?:inity)?$/i || m/^nan$/i) && Scalar::Util::looks_like_number($_)) print("N:"); print("$_n");' <x
a
N:123
N:+1
N:-1
1
b
1a
N:3.14
c
3.1415926 is an approximation of pi
N:1e-12
inf
Inf
Infinity
Infinity +1 sword
+Infinity
-infinity
NaN
1/2
I changed the prefix to "N:" simply because "number--1" looks a bit rubbish. Note that this treats " 1", for example, as not numeric. If that is undesirable behaviour, do not include the "m/^s/" test for leading whitespace.
If you mean "0-9", Sergiy's sed solution above is fine.
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
add a comment |
lines that contain ONLY numbers
It's unclear whether you mean numbers or just 0-9. Here's a Perl one-liner that picks out the likes of 123, 3.14 and 1e-12 while ignoring various representations of infinity and not-a-number:
$ perl -MScalar::Util -ne 'chomp; if (!(m/^s/ || m/^[+-]?inf(?:inity)?$/i || m/^nan$/i) && Scalar::Util::looks_like_number($_)) print("N:"); print("$_n");' <x
a
N:123
N:+1
N:-1
1
b
1a
N:3.14
c
3.1415926 is an approximation of pi
N:1e-12
inf
Inf
Infinity
Infinity +1 sword
+Infinity
-infinity
NaN
1/2
I changed the prefix to "N:" simply because "number--1" looks a bit rubbish. Note that this treats " 1", for example, as not numeric. If that is undesirable behaviour, do not include the "m/^s/" test for leading whitespace.
If you mean "0-9", Sergiy's sed solution above is fine.
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
add a comment |
lines that contain ONLY numbers
It's unclear whether you mean numbers or just 0-9. Here's a Perl one-liner that picks out the likes of 123, 3.14 and 1e-12 while ignoring various representations of infinity and not-a-number:
$ perl -MScalar::Util -ne 'chomp; if (!(m/^s/ || m/^[+-]?inf(?:inity)?$/i || m/^nan$/i) && Scalar::Util::looks_like_number($_)) print("N:"); print("$_n");' <x
a
N:123
N:+1
N:-1
1
b
1a
N:3.14
c
3.1415926 is an approximation of pi
N:1e-12
inf
Inf
Infinity
Infinity +1 sword
+Infinity
-infinity
NaN
1/2
I changed the prefix to "N:" simply because "number--1" looks a bit rubbish. Note that this treats " 1", for example, as not numeric. If that is undesirable behaviour, do not include the "m/^s/" test for leading whitespace.
If you mean "0-9", Sergiy's sed solution above is fine.
lines that contain ONLY numbers
It's unclear whether you mean numbers or just 0-9. Here's a Perl one-liner that picks out the likes of 123, 3.14 and 1e-12 while ignoring various representations of infinity and not-a-number:
$ perl -MScalar::Util -ne 'chomp; if (!(m/^s/ || m/^[+-]?inf(?:inity)?$/i || m/^nan$/i) && Scalar::Util::looks_like_number($_)) print("N:"); print("$_n");' <x
a
N:123
N:+1
N:-1
1
b
1a
N:3.14
c
3.1415926 is an approximation of pi
N:1e-12
inf
Inf
Infinity
Infinity +1 sword
+Infinity
-infinity
NaN
1/2
I changed the prefix to "N:" simply because "number--1" looks a bit rubbish. Note that this treats " 1", for example, as not numeric. If that is undesirable behaviour, do not include the "m/^s/" test for leading whitespace.
If you mean "0-9", Sergiy's sed solution above is fine.
answered Mar 29 at 11:56
Chris WilliamsChris Williams
311
311
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
add a comment |
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
Probably an overkill for this question, but still awesome ! +1
– Sergiy Kolodyazhnyy
Mar 29 at 12:06
add a comment |
You can try this
$cat input.txt
Series
Of
Word
73914
Again
Word
$awk ' if($1 ~/[0-9]/) printf "number - %sn",$1; else print $1 ' input.txt
Series
Of
Word
number - 73914
Again
Word
Usingif
statement, nice ! Thank you :D
– Jim
Mar 29 at 9:42
add a comment |
You can try this
$cat input.txt
Series
Of
Word
73914
Again
Word
$awk ' if($1 ~/[0-9]/) printf "number - %sn",$1; else print $1 ' input.txt
Series
Of
Word
number - 73914
Again
Word
Usingif
statement, nice ! Thank you :D
– Jim
Mar 29 at 9:42
add a comment |
You can try this
$cat input.txt
Series
Of
Word
73914
Again
Word
$awk ' if($1 ~/[0-9]/) printf "number - %sn",$1; else print $1 ' input.txt
Series
Of
Word
number - 73914
Again
Word
You can try this
$cat input.txt
Series
Of
Word
73914
Again
Word
$awk ' if($1 ~/[0-9]/) printf "number - %sn",$1; else print $1 ' input.txt
Series
Of
Word
number - 73914
Again
Word
answered Mar 29 at 7:26
GoronGoron
1719
1719
Usingif
statement, nice ! Thank you :D
– Jim
Mar 29 at 9:42
add a comment |
Usingif
statement, nice ! Thank you :D
– Jim
Mar 29 at 9:42
Using
if
statement, nice ! Thank you :D– Jim
Mar 29 at 9:42
Using
if
statement, nice ! Thank you :D– Jim
Mar 29 at 9:42
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129567%2fhow-to-prepend-a-string-to-only-the-lines-of-text-which-are-numbers%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you want to do with a line like
1st word 2nd word
?– glenn jackman
Mar 29 at 18:00
And do you want only lines that are entirely a number or that start with a number? E.g. would you want
123abc
to be changed tonumber-123abc
or not?– Kevin
Mar 29 at 19:57