Compare the first five elements of a column to the restCompare first column in different filesMatching two...

Does Dispel Magic destroy Artificer Turrets?

How can Paypal know my card is being used in another account?

What are the cons of stateless password generators?

Reading line from terminal in expl3

Is this photo showing a woman standing in the nude before teenagers real?

Is there an antonym for "spicy" or "hot" regarding food?

Move the outer key inward in an association

Why does Canada require mandatory bilingualism in a lot of federal government posts?

Why didn’t Christianity spread southwards from Ethiopia in the Middle Ages?

Polyhedra, Polyhedron, Polytopes and Polygon

Are there any unpublished Iain M. Banks short stories?

Anti-cheating: should there be a limit to a number of toilet breaks per game per player?

Will this creature from Curse of Strahd reappear after being banished?

Why force the nose of 737 Max down in the first place?

ECDSA: Why is SigningKey shorter than VerifyingKey

How long until two planets become one?

Is it error of law to judge on less relevant case law when there is much more relevant one?

Why were contact sensors put on three of the Lunar Module's four legs? Did they ever bend and stick out sideways?

Should I accept an invitation to give a talk from someone who might review my proposal?

Does dual boot harm a laptop battery or reduce its life?

How did the SysRq key get onto modern keyboards if it's rarely used?

Assuring luggage isn't lost with short layover

Do 3/8 (37.5%) of Quadratics Have No x-Intercepts?

Why use the "finally" keyword?



Compare the first five elements of a column to the rest


Compare first column in different filesMatching two main columns at the same time between files, and paste supplementary columns into the output file when those main columns matchMatching 2 main columns between files; and paste other columns into the output file when those main columns match. Keep row size of 1st file intactDelete columns that sum to zeroshell: dividing columns using awk stops if there is a non integer foundSelect every two rows if they begin with the same nameCompare two files by first column. Keep rows if matchingcompare first column of 2 file : while second have 2 column but first have one columnawk print tab delimited columns with find execdirawk compare array to array on previous line






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







0















I hope you can help me to fix this problem



I want to compare the first five elements of a column to the rest elements (column by column).




  • If the first 5 elements are equal --> continue

  • If the first 5 elements are equal, and different to the rest, print these columns


The table has more than 100 columns and 12 rows, the table is separated by TABS.



For example:
Input:



Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Lion Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Dave Laura Taylor Chris Dona Sara

Dave Laura Harvey Chris Dan Sara

n ...


Output:



Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Dave Taylor Sara

Dave Harvey Sara


I really appreciate all your ideas and comments,



Thank you










share|improve this question









New contributor



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






















  • From the example, it seems that you want to print the first, third, and sixth columns. From your description, however, you seem to want something else entirely. If you want good answers, you need to make your goal perfectly clear.

    – John1024
    16 mins ago


















0















I hope you can help me to fix this problem



I want to compare the first five elements of a column to the rest elements (column by column).




  • If the first 5 elements are equal --> continue

  • If the first 5 elements are equal, and different to the rest, print these columns


The table has more than 100 columns and 12 rows, the table is separated by TABS.



For example:
Input:



Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Lion Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Dave Laura Taylor Chris Dona Sara

Dave Laura Harvey Chris Dan Sara

n ...


Output:



Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Dave Taylor Sara

Dave Harvey Sara


I really appreciate all your ideas and comments,



Thank you










share|improve this question









New contributor



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






















  • From the example, it seems that you want to print the first, third, and sixth columns. From your description, however, you seem to want something else entirely. If you want good answers, you need to make your goal perfectly clear.

    – John1024
    16 mins ago














0












0








0








I hope you can help me to fix this problem



I want to compare the first five elements of a column to the rest elements (column by column).




  • If the first 5 elements are equal --> continue

  • If the first 5 elements are equal, and different to the rest, print these columns


The table has more than 100 columns and 12 rows, the table is separated by TABS.



For example:
Input:



Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Lion Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Dave Laura Taylor Chris Dona Sara

Dave Laura Harvey Chris Dan Sara

n ...


Output:



Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Dave Taylor Sara

Dave Harvey Sara


I really appreciate all your ideas and comments,



Thank you










share|improve this question









New contributor



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











I hope you can help me to fix this problem



I want to compare the first five elements of a column to the rest elements (column by column).




  • If the first 5 elements are equal --> continue

  • If the first 5 elements are equal, and different to the rest, print these columns


The table has more than 100 columns and 12 rows, the table is separated by TABS.



For example:
Input:



Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Lion Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Jhon Laura Ben Chris Dan Tom

Dave Laura Taylor Chris Dona Sara

Dave Laura Harvey Chris Dan Sara

n ...


Output:



Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Jhon Ben Tom

Dave Taylor Sara

Dave Harvey Sara


I really appreciate all your ideas and comments,



Thank you







awk filter






share|improve this question









New contributor



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










share|improve this question









New contributor



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








share|improve this question




share|improve this question








edited 18 mins ago









John1024

51.4k5 gold badges118 silver badges132 bronze badges




51.4k5 gold badges118 silver badges132 bronze badges






New contributor



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








asked 40 mins ago









YocelynYocelyn

1




1




New contributor



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




New contributor




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


















  • From the example, it seems that you want to print the first, third, and sixth columns. From your description, however, you seem to want something else entirely. If you want good answers, you need to make your goal perfectly clear.

    – John1024
    16 mins ago



















  • From the example, it seems that you want to print the first, third, and sixth columns. From your description, however, you seem to want something else entirely. If you want good answers, you need to make your goal perfectly clear.

    – John1024
    16 mins ago

















From the example, it seems that you want to print the first, third, and sixth columns. From your description, however, you seem to want something else entirely. If you want good answers, you need to make your goal perfectly clear.

– John1024
16 mins ago





From the example, it seems that you want to print the first, third, and sixth columns. From your description, however, you seem to want something else entirely. If you want good answers, you need to make your goal perfectly clear.

– John1024
16 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
});


}
});






Yocelyn 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%2f532861%2fcompare-the-first-five-elements-of-a-column-to-the-rest%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








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










draft saved

draft discarded


















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













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












Yocelyn 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%2f532861%2fcompare-the-first-five-elements-of-a-column-to-the-rest%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

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m