Creare un unico file CSV e campo nome file
Creare un unico file CSV e aggiungere un campo con il nome del file di provenienza.
A cura di
Totò Fiandaca
| issue
#185
| guida/e
Andrea Borruso
Caso d’uso
Cartella con molti file CSV (xxxxx.csv) con identica struttura:
| ID | nome | cognome |
|---|---|---|
| 1 | Totò | pigreco |
| 2 | Andy | rossi |
comando da usare
mlr --csv put -S '$file=FILENAME' *.csv >output.csv
output
| ID | nome | cognome | file |
|---|---|---|---|
| 1 | Totò | pigreco | xxxxx |
| 2 | Andy | rossi | xxxxx |
| 3 | Tony | gallo | yyyyy |
| 4 | Rosy | roy | yyyyy |
riferimenti
- Miller : https://github.com/johnkerl/miller
Ultima modifica 18/08/2021: add ricetta (861c3bc)