1

Topic: drop text

hi.
there is a txt file
sample:
1 text
more text
1.1 text
more text
1.1.2 text
more text
...
2
...
3 text
more text
3.1 text
...
how to remove all the text
leave only numbers
1
1.1
1.1.2
...
2
...
3
3.1
thk.
bash shell awk sed perl

2

Re: drop text

3

Re: drop text

cat txt |tr-d [:alpha:]

4

Re: drop text

Denis wrote:

cat txt |tr-d [:alpha:]

thk.