mirror of
https://github.com/logos-storage/logtools.git
synced 2026-01-02 13:33:07 +00:00
8 lines
282 B
Bash
8 lines
282 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
# Concatenates CSV files that have identical headers by removing the header from all but the first file. This is
|
||
|
|
# meant to be used after a call to `cat`; e.g., cat csv1.csv csv2.csv | lscsv-concat.sh
|
||
|
|
set -e
|
||
|
|
|
||
|
|
header=$(head -n 1)
|
||
|
|
echo "$header"
|
||
|
|
grep "$header" -Fv
|