-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to not append header into txt while merging multiple csv files
- Loading branch information
Marijana Crepulja
committed
May 13, 2020
1 parent
502ecbb
commit 2205e6a
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
set -ex | ||
|
||
rm -f txt/BUFRCREX_CodeFlag_en.txt | true | ||
cat BUFRCREX_CodeFlag_en_*.csv >> txt/BUFRCREX_CodeFlag_en.txt | ||
#cat BUFRCREX_CodeFlag_en_*.csv >> txt/BUFRCREX_CodeFlag_en.txt | ||
awk '(NR == 1) || (FNR > 1)' BUFRCREX_CodeFlag_en_*.csv >> txt/BUFRCREX_CodeFlag_en.txt | ||
|
||
rm -f txt/BUFRCREX_TableB_en.txt | true | ||
cat BUFRCREX_TableB_en_*.csv >> txt/BUFRCREX_TableB_en.txt | ||
#cat BUFRCREX_TableB_en_*.csv >> txt/BUFRCREX_TableB_en.txt | ||
awk '(NR == 1) || (FNR > 1)' BUFRCREX_TableB_en_*.csv >> txt/BUFRCREX_TableB_en.txt | ||
|
||
cp BUFR_TableA_en.csv txt/BUFR_TableA_en.txt | ||
cp BUFR_TableC_en.csv txt/BUFR_TableC_en.txt | ||
|
||
rm -f txt/BUFR_TableD_en.txt | true | ||
cat BUFR_TableD_en_*.csv >> txt/BUFR_TableD_en.txt | ||
#cat BUFR_TableD_en_*.csv >> txt/BUFR_TableD_en.txt | ||
awk '(NR == 1) || (FNR > 1)' BUFR_TableD_en_*.csv >> txt/BUFR_TableD_en.txt | ||
|
||
cp CREX_TableA_en.csv txt/CREX_TableA_en.txt | ||
cp CREX_TableC_en.csv txt/CREX_TableC_en.txt | ||
|
||
rm -f txt/CREX_TableD_en.txt | true | ||
cat CREX_TableD_en_*.csv >> txt/CREX_TableD_en.txt | ||
#cat CREX_TableD_en_*.csv >> txt/CREX_TableD_en.txt | ||
awk '(NR == 1) || (FNR > 1)' CREX_TableD_en_*.csv >> txt/CREX_TableD_en.txt | ||
|
||
python3 scripts/csv2xml.py |
2205e6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good fix. Thanks. Please make a pull request next time as we need to be aware of the changes