LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2014, 12:47 PM   #1
crazyspice
LQ Newbie
 
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
Merging 2 files with awk


I would like to merge 2 files into 1.

for file A - i would like print $0 until I see a marker/flag- '~A ' in $1
then insert a part of file B
then from File A print $0 starting from the marker'~A '

** from file A I would like a variable X is $2 where $1 is WELL

I hope someone can help me out.
Thanks
 
Old 02-24-2014, 06:02 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,493

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Happy to help. What have you done and where are you stuck?
 
  


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
Merging many files as one niharikaananth Linux - Newbie 5 08-15-2011 01:07 PM
[SOLVED] merging files with different number of rows using awk linux002 Linux - Newbie 8 05-05-2011 03:26 PM
merging content of two files using sed or awk mukherjee_debajyoti Programming 5 11-30-2009 05:43 AM
using awk...merging two files...lines...one after another... visitnag Linux - Newbie 4 07-14-2008 11:37 AM
Merging Two Files using C++ ckoniecny Programming 5 09-26-2006 09:00 AM


All times are GMT -5. The time now is 05:21 PM.

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