Compare 2 Columns of 2 Files and print the entire matched line from first filecompare two columns of...

What do you call a situation where you have choices but no good choice?

What does the multimeter dial do internally?

Draw a diagram with rectangles

Write a function

How to understand flavors and when to use combination of them?

This LM317 diagram doesn't make any sense to me

What was the profession 芸者 (female entertainer) called in Britain?

How can I review my manager, who is fine?

How should I ask for a "pint" in countries that use metric?

Why won't the U.S. sign a peace treaty with North Korea?

Four ships at the ocean with the same distance

How do I separate enchants from items?

Other Space Shuttle O-ring failures

What factors could lead to bishops establishing monastic armies?

Can Jimmy hang on his rope?

Gory anime with pink haired girl escaping an asylum

Why does Trump want a citizenship question on the census?

Intern not wearing safety equipment; how could I have handled this differently?

Did depressed people far more accurately estimate how many monsters they killed in a video game?

With a data transfer of 50 GB estimated 5 hours, are USB-C claimed speeds inaccurate or to blame?

How to use Adostop Eco stop bath?

US citizen traveling with Peruvian passport

Chilling water in copper vessel

A ring of generalized power series



Compare 2 Columns of 2 Files and print the entire matched line from first file


compare two columns of different files and print if it matchescompare 1 column in 2 files and print the different lineHow to join 2 files based on common rows of first columns?compare two csv files and fetch matching dataHow to join text files based on a column and removing the first line in linux?Comparing two fields from two files and printing the common items from the files with the count from each fileCompare first and second column of two files and print the row from second file if there is a matchCompare two files and get unmatched rows from the second file based on first and second columncompare a certain number of lines between columns of two filesHow to replace matching words defined in one file on another file?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-1















First file1:



into-main-4543 interdemo combine unit 2233 syntax1
dsml-main-6321 interunit combine unit 3453 syntax3
into-main-9038 maindemo split unit 3456 syntax2



File2:
unit 2233
unit 3456



I want the output as below:
into-main-4543 interdemo combine unit 2233 syntax1
into-main-9038 maindemo split unit 3456 syntax2



Please have a look. Thank you









share







New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • please use proper formatting.

    – Bart
    19 mins ago











  • please also provide what you already did yourself, this just looks like a request to do homework for you.

    – Bart
    18 mins ago


















-1















First file1:



into-main-4543 interdemo combine unit 2233 syntax1
dsml-main-6321 interunit combine unit 3453 syntax3
into-main-9038 maindemo split unit 3456 syntax2



File2:
unit 2233
unit 3456



I want the output as below:
into-main-4543 interdemo combine unit 2233 syntax1
into-main-9038 maindemo split unit 3456 syntax2



Please have a look. Thank you









share







New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • please use proper formatting.

    – Bart
    19 mins ago











  • please also provide what you already did yourself, this just looks like a request to do homework for you.

    – Bart
    18 mins ago














-1












-1








-1








First file1:



into-main-4543 interdemo combine unit 2233 syntax1
dsml-main-6321 interunit combine unit 3453 syntax3
into-main-9038 maindemo split unit 3456 syntax2



File2:
unit 2233
unit 3456



I want the output as below:
into-main-4543 interdemo combine unit 2233 syntax1
into-main-9038 maindemo split unit 3456 syntax2



Please have a look. Thank you









share







New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











First file1:



into-main-4543 interdemo combine unit 2233 syntax1
dsml-main-6321 interunit combine unit 3453 syntax3
into-main-9038 maindemo split unit 3456 syntax2



File2:
unit 2233
unit 3456



I want the output as below:
into-main-4543 interdemo combine unit 2233 syntax1
into-main-9038 maindemo split unit 3456 syntax2



Please have a look. Thank you







linux shell-script shell





share







New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share







New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







share



share






New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 23 mins ago









user361150user361150

1




1




New contributor



user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




user361150 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • please use proper formatting.

    – Bart
    19 mins ago











  • please also provide what you already did yourself, this just looks like a request to do homework for you.

    – Bart
    18 mins ago



















  • please use proper formatting.

    – Bart
    19 mins ago











  • please also provide what you already did yourself, this just looks like a request to do homework for you.

    – Bart
    18 mins ago

















please use proper formatting.

– Bart
19 mins ago





please use proper formatting.

– Bart
19 mins ago













please also provide what you already did yourself, this just looks like a request to do homework for you.

– Bart
18 mins ago





please also provide what you already did yourself, this just looks like a request to do homework for you.

– Bart
18 mins ago










0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






user361150 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f528742%2fcompare-2-columns-of-2-files-and-print-the-entire-matched-line-from-first-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








user361150 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















user361150 is a new contributor. Be nice, and check out our Code of Conduct.













user361150 is a new contributor. Be nice, and check out our Code of Conduct.












user361150 is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f528742%2fcompare-2-columns-of-2-files-and-print-the-entire-matched-line-from-first-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...