Jump to content

grep issues - cut the digit of 8000 lines


dil_bert

Recommended Posts

hello dear experts

 

 

this

 

egrep -o '^[[:space:]]?.*[[:digit:]]\b' bib.txt


runned on that



2:1 Jésus étant né à Bethléhem en Judée, au temps du roi Hérode, voici des mages d 'Orient arrivèrent à Jérusalem,
 2 et dirent: Où est le roi des Juifs qui vient de naître ? car nous avons vu son étoile en Orient, et nous sommes venus pour l 'adorer.
 3 Le roi Hérode, ayant appris cela, fut troublé, et tout Jérusalem avec lui.
 4 Il assembla tous les principaux sacrificateurs et les scribes du peuple, et il s'informa auprès d'eux où devait naître le Christ.
 5 Ils lui dirent: À Bethléhem en Judée; car voici ce qui a été écrit par le prophète:
 6 Et toi, Bethléhem, terre de Juda, Tu n'es certes pas la moindre entre les principales villes de Juda, Car de toi sortira un chef Qui paîtra Israël, mon peuple.
 7 Alors Hérode fit appeler en secret les mages, et s'enquit soigneusement auprès d'eux depuis combien de temps l'étoile brillait.
 8 Puis il les envoya à Bethléhem, en disant: Allez, et prenez des informations exactes sur le petit enfant; quand vous l'aurez trouvé, faites-le-moi savoir, afin que j'aille aussi moi-même l'adorer.
 9 Après avoir entendu le roi, ils partirent. Et voici, l'étoile qu 'ils avaient vue en Orient marchait devant eux jusqu'à ce qu'étant arrivée au-dessus du lieu où était le petit enfant, elle s'arrêta.
 10 Quand ils aperçurent l'étoile, ils furent saisis d'une très grande joie.
 

 

 

 

gives back this

 


00001: 2:1 Jésus étant né à Bethléhem en Judée, au temps du roi Hérode, voici des mages d 'Orient arrivèrent à Jérusalem,
00002:  2 et dirent: Où est le roi des Juifs qui vient de naître ? car nous avons vu son étoile en Orient, et nous sommes venus pour l 'adorer.
00003:  3 Le roi Hérode, ayant appris cela, fut troublé, et tout Jérusalem avec lui.
00004:  4 Il assembla tous les principaux sacrificateurs et les scribes du peuple, et il s'informa auprès d'eux où devait naître le Christ.
00005:  5 Ils lui dirent: À Bethléhem en Judée; car voici ce qui a été écrit par le prophète:
00006:  6 Et toi, Bethléhem, terre de Juda, Tu n'es certes pas la moindre entre les principales villes de Juda, Car de toi sortira un chef Qui paîtra Israël, mon peuple.
00007:  7 Alors Hérode fit appeler en secret les mages, et s'enquit soigneusement auprès d'eux depuis combien de temps l'étoile brillait.
00008:  8 Puis il les envoya à Bethléhem, en disant: Allez, et prenez des informations exactes sur le petit enfant; quand vous l'aurez trouvé, faites-le-moi savoir, afin que j'aille aussi moi-même l'adorer.
00009:  9 Après avoir entendu le roi, ils partirent. Et voici, l'étoile qu 'ils avaient vue en Orient marchait devant eux jusqu'à ce qu'étant arrivée au-dessus du lieu où était le petit enfant, elle s'arrêta.
00010:  10 Quand ils aperçurent l'étoile, ils furent saisis d'une très grande joie.
00011:  

 

what is aimed: i need to cut the numbers - and give them a single (separate) column

 

is this possible!?

00013:
00014:
00015:



 

Link to comment
Share on other sites

hello dear requinix

many thanks for the quick reply

i want to put the data into a calc sheet

 

 

note - i have to give the text a structure - see the reference: http://catholic-resources.org/Bible/NT-Statistics-Greek.htm

note: we have 7956 verses -

all those should go into a calc sheet - each verse gets one line.-

 

and the first column of the table should get a cardinal reference -

1.

2.

3.

4.

5.

 

how to achieve that ?

 

Depends if you're going to answer my questions.

Text files do not have "columns". What are you talking about?

Link to comment
Share on other sites

...and the first column of the sheet gets the line number?

 

1. Put all the lines into the spreadsheet right now. No line numbers.

2. Add a column to the left of the verses.

3. Insert this formula into the new first column of every row.

=ROW()
Now you have line numbers.
Link to comment
Share on other sites

hello dear requinix

 

many thanks for your great tip

 

...and the first column of the sheet gets the line number?

1. Put all the lines into the spreadsheet right now. No line numbers.
2. Add a column to the left of the verses.
3. Insert this formula into the new first column of every row.

=ROW()
Now you have line numbers.

 

 

great - and how to get rid of the numbers that are in each line - right in front of the text. Can i get rid of them - somehow.

 

love to hear from you

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.