Home » Infrastructure » Unix » Merging Multiple CSV Files into One with One Header
Merging Multiple CSV Files into One with One Header [message #627573] Wed, 12 November 2014 14:38 Go to next message
reddy0422
Messages: 10
Registered: June 2014
Junior Member
Hi,

I wrote a shell script to merge all the csv files into one.All the multiple csv files have the same number of columns .The issue i see let's say i merge 10 files all the 10 files header records are also merging.I want only one header row as all the headers are the same.Can anyone please advise.

below is the concatenation command i am using to merge the files but i need to have only one header row.

cat $working/text_data*.csv > $working/text_data.csv

Thanks,
Re: Merging Multiple CSV Files into One with One Header [message #627574 is a reply to message #627573] Wed, 12 November 2014 14:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
1) Problem & solution have nothing to do with Oracle.
2) the additional rows or records do not change what gets loaded into the DB
3) the desired results can be achieved by using wc -l & tail commands
Re: Merging Multiple CSV Files into One with One Header [message #627575 is a reply to message #627573] Wed, 12 November 2014 14:59 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

This question bears no real connection with Oracle database.
Please find a more appropriate forum.
The topic is locked. /forum/fa/448/0/
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Previous Topic: Oracle 11g installer not detecting enough disk space
Next Topic: All pre-req checks failing
Goto Forum:
  


Current Time: Fri Nov 22 16:33:10 CST 2024