samedi 6 avril 2019

Bash. Move N random lines from text file A to text file B

How to do this:

Have text.txt which consists of numerous lines of text:

Text text Textetext Some text

Need to get N from prompt and then: 1. RANDOMLY cut N lines from text.txt 2. Add {text} to the beginning of each cut line and {text2} to the end. 3. Append this modified lines to the result.txt

Will appreciate your help and advice!




Aucun commentaire:

Enregistrer un commentaire