LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2017, 07:00 AM   #1
Hanmant Kadam
LQ Newbie
 
Registered: Dec 2017
Posts: 1

Rep: Reputation: Disabled
file processing in shell script


First file1
1234567890,70,domino z
1234567890,70,"commoner"
1234234567,72,city pride
Second file2
4523456789,91,lava
1234567890,70,cf_road
5426678624,76,pantaloons
I want want merge above tow file and output like file3
1234567890,70,domino z,commoner,cf_road
1234234567,72,city pride
4523456789,91,lava
5426678624,76,pantaloons
 
Old 12-04-2017, 07:12 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,014

Rep: Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756Reputation: 4756
Quote:
Originally Posted by Hanmant Kadam View Post
First file1
1234567890,70,domino z
1234567890,70,"commoner"
1234234567,72,city pride
Second file2
4523456789,91,lava
1234567890,70,cf_road
5426678624,76,pantaloons
I want want merge above tow file and output like file3
1234567890,70,domino z,commoner,cf_road
1234234567,72,city pride
4523456789,91,lava
5426678624,76,pantaloons
Great...so now that we know what you WANT to do, show us what **YOU** have done to at least TRY to accomplish it. Read the "Question Guidelines" link in my posting signature; we are happy to help, but we are NOT going to just write your scripts/do your homework for you. There are THOUSANDS of easily found bash scripting guides that can help get you started, and you can find those with a brief Google search.

Start there, post your efforts, and tell us where you're stuck and we will be glad to assist.
 
Old 12-04-2017, 07:53 PM   #3
MadeInGermany
Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 721

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
The join command can do it IMHO. Check the man page
Code:
man join
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script overhead for realtime processing MarkAren Programming 3 08-07-2015 11:58 PM
[SOLVED] Batch File Processing via Script jman82s Linux - Software 9 05-18-2012 02:49 PM
[SOLVED] File Processing in a Script drandre Linux - Newbie 5 04-19-2012 12:28 PM
Versioned file processing script yungblood Linux - General 2 03-05-2011 10:25 AM
shell script for processing file: RudraB Programming 8 06-30-2010 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration