Concatenate text of two files in UNIX. | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Concatenate text of two files in UNIX.

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-19-2007
Uniq Uniq is offline
Registered User
 
Join Date: Jan 2007
Last Activity: 19 January 2007, 3:00 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Concatenate text of two files in UNIX.

I have a file MyTest.csv saved in Unicode format in Incoming directory, and I have another file called MyTest.csv saved in ANSII format in InProcess Directory.

I need to concatenate the text of both these files and put in another file MyTest.csv which is placed in the root directory.

How do I do the same?

When I use a normal CAT command in UNIX I am getting the attached error.



If I try to open the file saved in ANSII format I am able to open, but I am unable to open the file which is saved in Unicode format?

Please suggest a way to concatenate the files saved in different formats (viz Unicode and ANSII) in UNIX box.
Sponsored Links
    #2  
Old 01-19-2007
cbkihong cbkihong is offline Forum Advisor  
Advisor
 
Join Date: Sep 2002
Last Activity: 4 May 2014, 6:22 AM EDT
Location: Hong Kong, China
Posts: 1,622
Thanks: 0
Thanked 9 Times in 8 Posts
Do you have iconv installed on your system? If so, try converting both of the files to UTF-8 before concatenation.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Concatenate files bobby1015 Shell Programming and Scripting 3 02-24-2012 11:38 AM
Concatenate more than 200 files amarn UNIX for Dummies Questions & Answers 2 01-16-2012 02:27 PM
How to concatenate text files together buechler66 Shell Programming and Scripting 1 07-20-2011 08:55 AM
Concatenate several thousand files in unix Gussifinknottle UNIX for Dummies Questions & Answers 6 11-16-2009 10:43 AM
How to concatenate all files. s80bob UNIX for Dummies Questions & Answers 1 08-22-2005 04:20 PM



All times are GMT -4. The time now is 02:59 AM.