vendredi 15 mai 2020

How to extract the string between two variable patterns using bash scripting and save it as a new line in another text file

I have multiple text files having a content like this :

1 hvYUFEUNJ IHTRCZD NCJZBNJH CBjbhdsughuihz euAHZDXQ SJBFCHZEG. 2 oiuryt nbnbcjhd kkzomlqmpl do,nshggtsbs. 3 nncbbvggsvbdjklgpoolqjhtyrfvvsffs. 4 sjhgfuy jfgqkj hdbjh. 5 ggsnxb bgwtfgerf gfqghs . 6 ikdolmw ,xhhsfhbs. 7 ioonnjhd hgghetggs dppoehwq hhfynbgs. 8 op,n,fhysdn bgrferdfgss, kloodfjjnhhdd; hbhjkhkj. 9 olruyshns bvfeqcvcqxezstguhdud n,jhufiog, okdfoijuuhughoerltr. 10 ppooiuusnhhd bggfdfqvghdgur nkkdoiiuyhujdsed, jihughbjddf? jhghygj. 11 jiojhqsuhgfueguezhg bugyguhijed, okopzsjoijert?. 12 jqsiouhsgdqs, pkozejriuyhuhcujez. ojoihyuitguygyu.

I would like to extract the texts between the consecutive numbers and save it as a new line in another text file. How to proceed ?

Aucun commentaire:

Enregistrer un commentaire