Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need to merge first column of one and third column of second file in another file

Status
Not open for further replies.

kirteshmiet

Member level 1
Joined
Feb 16, 2012
Messages
38
Helped
11
Reputation
22
Reaction score
11
Trophy points
1,288
Activity points
1,535
Hello friends!
Here is the scenario.
I have two files named FILE1.TXT and FILE2.TXT with multiple columns and comma as delimiter.
Now my task is to create another file called FILE3.TXT which contains the FIRST column values from FILE1.TXT & THIRD column values from FILE2.TXT separated by comma.
Which mean i am creating a new files with only two columns which are 1st and 3rd. Ex:
FILE1.TXT
1,2
1,2
1,2
1,2
1,2

FILE2.TXT
4,2,3
4,2,3
4,2,3
4,2,3
4,2,3

Now after creating another file FILE3.TXT it should look like this:
FILE3.TXT
1,3
1,3
1,3
1,3
1,3

Thanks in advance.:thumbsup::thumbsup:
 

Try renaming the extension of your file to .csv instead of .txt. So:

FILE1.TXT -> FILE1.CSV

You should be able to open the .csv files in MS Excel with the data arranged appropriately. Copying/Merging the columns should be much easier now.
 

Hi ernpao ,
Thanks for your suggession, but in my case open office is not there and also i can not copy data from my workstation to pc . so i have to do this with commands of unix . using awk sed vi etc.

Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top