Home > centOS, Fedora 12 > How can i add 30 files into 1 single files? For instance CSV files with multiple sheets saved as many different file.

How can i add 30 files into 1 single files? For instance CSV files with multiple sheets saved as many different file.

To mix multiple files into one single file:

$ ls
10.csv  13.csv  16.csv  19.csv  22.csv  25.csv  28.csv  30.csv  33.csv  36.csv  39.csv  41.csv  44.csv  47.csv  4.csv   6.csv  9.csv     all.original.csv
11.csv  14.csv  17.csv  20.csv  23.csv  26.csv  29.csv  31.csv  34.csv  37.csv  3.csv   42.csv  45.csv  48.csv  50.csv  7.csv  all.csv   done
12.csv  15.csv  18.csv  21.csv  24.csv  27.csv  2.csv   32.csv  35.csv  38.csv  40.csv  43.csv  46.csv  49.csv  5.csv   8.csv  all.csv~
$ cat ./*.csv >> all.csv

or

for i in `ls *.csv` ; do cat $i >> final.csv ; done

 

Advertisements
Categories: centOS, Fedora 12
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: