LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 01: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, 07:02 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,252

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


All times are GMT -5. The time now is 08:24 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