Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Merge two csv files using column name Post 302950501 by Don Cragun on Saturday 25th of July 2015 03:09:29 PM
Old 07-25-2015
The obvious guess would be that one or both of your input files is in DOS format (with <carriage-return><line-feed> line terminators) instead of UNIX format (with <newline> line terminators). To confirm, show us the output from the command:
Code:
for f in "File 1" "File 2"; do echo "File: $f";head -n 2 "$f"|od -cb;done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Merge 2 csv files with awk

I have 2 files pipe delimted and want to merge them based on a key e.g file 1 123$aaa$yyy$zzz 345$xab$yzy$zyz 456$sss$ttt$foo 799$aaa$ggg$dee file 2 123$hhh 345$ddd 456$xxx 888$zzz so if the key is the first field, and the result should be the common key between file 1 and 2 (6 Replies)
Discussion started by: loloAix
6 Replies

2. Shell Programming and Scripting

Merge 2 CSV files using sed

Help in writing a script using sed which updates fileOne with the contents from fileTwo Example: Contents of fileOne 1,111111 2,897823 3,235473 4,222222 Contents of fileTwo 1,111111,A,1,2 4,222222,A,2,2 5,374632,A,3,2 6,374654,A,4,2 Final File should be: 1,111111,A,1,2... (9 Replies)
Discussion started by: NewToSed
9 Replies

3. Shell Programming and Scripting

Merge CSV files and create a column with the filename from the original file

Hello everyone!! I am not completely new to shell script but I havent been able to find the answer to my problem and I'm sure there are some smart brains here up for the challenge :D. I have several CSV files that I need to combine into one, but I also need to know where each row came from.... (7 Replies)
Discussion started by: fransanchezoria
7 Replies

4. UNIX for Advanced & Expert Users

merge two column multiple files into one

Hi I have multiple files each with two columns and I need to combine all those file into a tab delimited file. (multiple entry with same name separated by a comma) The content of the files are as follows: --- file1.txt: name var1 aaa xx aaa gg bbb yy ddd zz --- file2.txt ... (8 Replies)
Discussion started by: mary271
8 Replies

5. Shell Programming and Scripting

Merge *.csv files, each in separate sheets

Does anyone know how to Merge *.csv files, each in seperate sheets? (7 Replies)
Discussion started by: frhling
7 Replies

6. Shell Programming and Scripting

Merge CSV files

I have lot of csv file collected from script like below : Name of files (some examples) there are thousands of it: 192.168.0.123_251_18796_1433144473.csv 192.168.0.123_251_18796_1433144772.csv 192.168.0.123_251_18796_1433145073.csv 192.168.0.123_251_18796_1433145372.csvContent of each... (5 Replies)
Discussion started by: rk4k
5 Replies

7. Shell Programming and Scripting

I am trying to merge all csv files from source path into 1 file

I am trying to merge all csv files from source path into one single csv file in target. but getting error message: hadoop fs -cat /user/hive/warehouse/stage.db/PK_CLOUD_CHARGE/TCH-charge_*.csv > /user/hive/warehouse/stage.db/PK_CLOUD_CHARGE/final/TCH_pb_charge.csv getting error message:... (0 Replies)
Discussion started by: cplusplus1
0 Replies

8. Shell Programming and Scripting

Compare and merge two big CSV files

Hi all, i need help. I have two csv files with a huge amount of data. I need the first column of the first file, to be compared with the data of the second, to have at the end a file with the data not present in the second file. Example File1: (only one column) profile_id 57036226... (11 Replies)
Discussion started by: SirMannu
11 Replies

9. Shell Programming and Scripting

Need awk or Shell script to compare Column-1 of two different CSV files and print if column-1 matche

Example: I have files in below format file 1: zxc,133,joe@example.com cst,222,xyz@example1.com File 2 Contains: hxd hcd jws zxc cst File 1 has 50000 lines and file 2 has around 30000 lines : Expected Output has to be : hxd hcd jws (5 Replies)
Discussion started by: TestPractice
5 Replies

10. UNIX for Beginners Questions & Answers

Merge the three csv files as one according to first coloumn.

I have three files with similar pattern i need to merge all the coloumns side by side from all three files according to the first coloumn example as shown below I mentioned 5 coloumns only in example but i have around 15 coloumns in each file. file1: Name,Samples,Error,95RT,90RT... (4 Replies)
Discussion started by: Raghuram717
4 Replies
SFINFO(1)																 SFINFO(1)

NAME
sfinfo - display information about audio files SYNOPSIS
sfinfo [options] audio files... DESCRIPTION
sfinfo prints information about the specified audio files, including file format, sample rate, duration, and audio data format. By default sfinfo displays information in a longer, multi-line format; specifying the --short or -s option produces a short, single-line summary. Any files which are not recognized as valid audio files will be ignored unless the --reporterror or -r option is given. The file formats currently supported by sfinfo are AIFF, AIFF-C, NeXT/Sun .snd/.au, WAVE, Berkeley/IRCAM/CARL Sound File, AVR, Amiga IFF/8SVX, Sample Vision, Creative Voice File, NIST SPHERE, and Core Audio Format. OPTIONS
--short, -s Print short single-line summary of each recognized audio file. --reporterror, -r Print an error message if any of the specified files are not recognized as valid audio files. --help, -h Print help message. --version, -v Print version information. EXAMPLES
Display summary of an audio file: % sfinfo drum.aiff File Name drum.aiff File Format Audio Interchange File Format (aiff) Data Format 16-bit integer (2's complement, big endian) Audio Data 1569972 bytes begins at offset 54 (36 hex) 2 channels, 392493 frames Sampling Rate 44100.00 Hz Duration 8.900 seconds List all recognized audio files in the current directory using the short output format: % sfinfo -s * 9.60s 44100.00 aiff 1ch 16b -- bass.aiff 8.90s 44100.00 aiff 2ch 16b -- drum.aiff SEE ALSO
sfconvert(1) AUTHOR
Michael Pruett <michael@68k.org> Audio File Library 0.3.6 03/06/2013 SFINFO(1)
All times are GMT -4. The time now is 09:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy