Skip to content

Instantly share code, notes, and snippets.

@dginhoux
Created October 29, 2022 18:31
Show Gist options
  • Save dginhoux/0f04b0cb00bb90153f8fe5af18c12204 to your computer and use it in GitHub Desktop.
Save dginhoux/0f04b0cb00bb90153f8fe5af18c12204 to your computer and use it in GitHub Desktop.
## splitter un fichier en plusieurs
## creer fichier template
for i in {0..100000000};do echo "}
## 1- par nombre de ligne
split -d -l50000 texte.txt suffix-
## 2- par quantité
split -d -n4 texte.txt suffix-
# lister
wc -l suffix*
## regrouper
cat suffix-* > texte2.txt
md5sum texte.txt
d4da8315d007541dfdcf61e2ea2fbecd texte.txt
md5sum texte2.txt
d4da8315d007541dfdcf61e2ea2fbecd texte2.txt
cat suffix-* | md5sum
d4da8315d007541dfdcf61e2ea2fbecd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment