Unix script to compare 3rd column value with first column and display [on hold]How can I compare two files based on the value of the first column?Shell Script to remove double quotes within the column valueunix: replace one entire column in one file with a single value from another fileMerging 2 files and keeping the one duplicateHow to compare 2 files with common columns and then get the output file with columns from each fileCompare two columns and insert value to next columncomparing 1st and 3rd column value in two filesCount by first column, count distinct by second column and group output by first column?compare column of two files and print data accordinglyawk command prints first column value as 1

Does the radius of the Spirit Guardians spell depend on the size of the caster?

Non-Jewish family in an Orthodox Jewish Wedding

"which" command doesn't work / path of Safari?

least quadratic residue under GRH: an EXPLICIT bound

What is the offset in a seaplane's hull?

What is the meaning of "of trouble" in the following sentence?

What is GPS' 19 year rollover and does it present a cybersecurity issue?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Prevent a directory in /tmp from being deleted

Finding files for which a command fails

Copycat chess is back

Should I join an office cleaning event for free?

What would happen to a modern skyscraper if it rains micro blackholes?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

How is the relation "the smallest element is the same" reflexive?

Are white and non-white police officers equally likely to kill black suspects?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

how to create a data type and make it available in all Databases?

Can a German sentence have two subjects?

XeLaTeX and pdfLaTeX ignore hyphenation

Can I make popcorn with any corn?

Is there a familial term for apples and pears?

Simulate Bitwise Cyclic Tag

Patience, young "Padovan"



Unix script to compare 3rd column value with first column and display [on hold]


How can I compare two files based on the value of the first column?Shell Script to remove double quotes within the column valueunix: replace one entire column in one file with a single value from another fileMerging 2 files and keeping the one duplicateHow to compare 2 files with common columns and then get the output file with columns from each fileCompare two columns and insert value to next columncomparing 1st and 3rd column value in two filesCount by first column, count distinct by second column and group output by first column?compare column of two files and print data accordinglyawk command prints first column value as 1






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








-2















My source data (INput) is like below



EPIC1 router EPIC2 Targetdefinition
Exp1 Expres rtr1 Router
SQL SrcQual Exp1 Expres
rtr1 Router EPIC1 Targetdefinition


My output like



SQL SrcQual Exp1 Expres
Exp1 Expres rtr1 Router
rtr1 Router EPIC1 Targetdefinition
EPIC1 router EPIC2 Targetdefinition


I need to write a Unix script to search 3rd column value in 1st column and display the records in sorted order like above output.










share|improve this question









New contributor




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











put on hold as off-topic by Rui F Ribeiro, Sparhawk, αғsнιη, Haxiel, Prvt_Yadv yesterday



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2





    Please show us what have you tried to do and where you need Unix enlightenment

    – Rui F Ribeiro
    2 days ago







  • 3





    Someone might help you, but we're not a script-writing service. To be able to help you learn how to do this yourself now and in the future, do you have any attempts at solving this parsing problem that you may share? You tagged the question with both sed and with awk, so I have to assume that you have some idea of how to solve it. In addition to that, the given input and output only differs in the way it's sorted (as far as I can see); could you give an example of where the comparison step actually matters?

    – Kusalananda
    2 days ago












  • also let's know how first row is generated in your expected output since as I understood next lines are produced with following 3rd column of each row where that appeared in first column of other line (or lines? Is value of 3rd column in each row unique within a file? ) , so how first line is come there is matter. please edit your question for clarification.

    – αғsнιη
    2 days ago












  • First row always starts with value SQL.

    – Sekhar
    2 days ago











  • @Sekhar That does not help in understanding the ordering of the lines in the output. I would have assumed that the lines were sorted on the last column, but if you say that the first line always should start with SQL, then it becomes unclear whether a line with something like Access or some other string in the last column should be put just below that or above it. Please edit your question to clarify, taking my other comment into consideration.

    – Kusalananda
    2 days ago

















-2















My source data (INput) is like below



EPIC1 router EPIC2 Targetdefinition
Exp1 Expres rtr1 Router
SQL SrcQual Exp1 Expres
rtr1 Router EPIC1 Targetdefinition


My output like



SQL SrcQual Exp1 Expres
Exp1 Expres rtr1 Router
rtr1 Router EPIC1 Targetdefinition
EPIC1 router EPIC2 Targetdefinition


I need to write a Unix script to search 3rd column value in 1st column and display the records in sorted order like above output.










share|improve this question









New contributor




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











put on hold as off-topic by Rui F Ribeiro, Sparhawk, αғsнιη, Haxiel, Prvt_Yadv yesterday



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2





    Please show us what have you tried to do and where you need Unix enlightenment

    – Rui F Ribeiro
    2 days ago







  • 3





    Someone might help you, but we're not a script-writing service. To be able to help you learn how to do this yourself now and in the future, do you have any attempts at solving this parsing problem that you may share? You tagged the question with both sed and with awk, so I have to assume that you have some idea of how to solve it. In addition to that, the given input and output only differs in the way it's sorted (as far as I can see); could you give an example of where the comparison step actually matters?

    – Kusalananda
    2 days ago












  • also let's know how first row is generated in your expected output since as I understood next lines are produced with following 3rd column of each row where that appeared in first column of other line (or lines? Is value of 3rd column in each row unique within a file? ) , so how first line is come there is matter. please edit your question for clarification.

    – αғsнιη
    2 days ago












  • First row always starts with value SQL.

    – Sekhar
    2 days ago











  • @Sekhar That does not help in understanding the ordering of the lines in the output. I would have assumed that the lines were sorted on the last column, but if you say that the first line always should start with SQL, then it becomes unclear whether a line with something like Access or some other string in the last column should be put just below that or above it. Please edit your question to clarify, taking my other comment into consideration.

    – Kusalananda
    2 days ago













-2












-2








-2


1






My source data (INput) is like below



EPIC1 router EPIC2 Targetdefinition
Exp1 Expres rtr1 Router
SQL SrcQual Exp1 Expres
rtr1 Router EPIC1 Targetdefinition


My output like



SQL SrcQual Exp1 Expres
Exp1 Expres rtr1 Router
rtr1 Router EPIC1 Targetdefinition
EPIC1 router EPIC2 Targetdefinition


I need to write a Unix script to search 3rd column value in 1st column and display the records in sorted order like above output.










share|improve this question









New contributor




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












My source data (INput) is like below



EPIC1 router EPIC2 Targetdefinition
Exp1 Expres rtr1 Router
SQL SrcQual Exp1 Expres
rtr1 Router EPIC1 Targetdefinition


My output like



SQL SrcQual Exp1 Expres
Exp1 Expres rtr1 Router
rtr1 Router EPIC1 Targetdefinition
EPIC1 router EPIC2 Targetdefinition


I need to write a Unix script to search 3rd column value in 1st column and display the records in sorted order like above output.







text-processing awk sed






share|improve this question









New contributor




Sekhar 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




Sekhar 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 2 days ago









Kusalananda

140k17261435




140k17261435






New contributor




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









asked 2 days ago









SekharSekhar

11




11




New contributor




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





New contributor





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






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




put on hold as off-topic by Rui F Ribeiro, Sparhawk, αғsнιη, Haxiel, Prvt_Yadv yesterday



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.







put on hold as off-topic by Rui F Ribeiro, Sparhawk, αғsнιη, Haxiel, Prvt_Yadv yesterday



  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 2





    Please show us what have you tried to do and where you need Unix enlightenment

    – Rui F Ribeiro
    2 days ago







  • 3





    Someone might help you, but we're not a script-writing service. To be able to help you learn how to do this yourself now and in the future, do you have any attempts at solving this parsing problem that you may share? You tagged the question with both sed and with awk, so I have to assume that you have some idea of how to solve it. In addition to that, the given input and output only differs in the way it's sorted (as far as I can see); could you give an example of where the comparison step actually matters?

    – Kusalananda
    2 days ago












  • also let's know how first row is generated in your expected output since as I understood next lines are produced with following 3rd column of each row where that appeared in first column of other line (or lines? Is value of 3rd column in each row unique within a file? ) , so how first line is come there is matter. please edit your question for clarification.

    – αғsнιη
    2 days ago












  • First row always starts with value SQL.

    – Sekhar
    2 days ago











  • @Sekhar That does not help in understanding the ordering of the lines in the output. I would have assumed that the lines were sorted on the last column, but if you say that the first line always should start with SQL, then it becomes unclear whether a line with something like Access or some other string in the last column should be put just below that or above it. Please edit your question to clarify, taking my other comment into consideration.

    – Kusalananda
    2 days ago












  • 2





    Please show us what have you tried to do and where you need Unix enlightenment

    – Rui F Ribeiro
    2 days ago







  • 3





    Someone might help you, but we're not a script-writing service. To be able to help you learn how to do this yourself now and in the future, do you have any attempts at solving this parsing problem that you may share? You tagged the question with both sed and with awk, so I have to assume that you have some idea of how to solve it. In addition to that, the given input and output only differs in the way it's sorted (as far as I can see); could you give an example of where the comparison step actually matters?

    – Kusalananda
    2 days ago












  • also let's know how first row is generated in your expected output since as I understood next lines are produced with following 3rd column of each row where that appeared in first column of other line (or lines? Is value of 3rd column in each row unique within a file? ) , so how first line is come there is matter. please edit your question for clarification.

    – αғsнιη
    2 days ago












  • First row always starts with value SQL.

    – Sekhar
    2 days ago











  • @Sekhar That does not help in understanding the ordering of the lines in the output. I would have assumed that the lines were sorted on the last column, but if you say that the first line always should start with SQL, then it becomes unclear whether a line with something like Access or some other string in the last column should be put just below that or above it. Please edit your question to clarify, taking my other comment into consideration.

    – Kusalananda
    2 days ago







2




2





Please show us what have you tried to do and where you need Unix enlightenment

– Rui F Ribeiro
2 days ago






Please show us what have you tried to do and where you need Unix enlightenment

– Rui F Ribeiro
2 days ago





3




3





Someone might help you, but we're not a script-writing service. To be able to help you learn how to do this yourself now and in the future, do you have any attempts at solving this parsing problem that you may share? You tagged the question with both sed and with awk, so I have to assume that you have some idea of how to solve it. In addition to that, the given input and output only differs in the way it's sorted (as far as I can see); could you give an example of where the comparison step actually matters?

– Kusalananda
2 days ago






Someone might help you, but we're not a script-writing service. To be able to help you learn how to do this yourself now and in the future, do you have any attempts at solving this parsing problem that you may share? You tagged the question with both sed and with awk, so I have to assume that you have some idea of how to solve it. In addition to that, the given input and output only differs in the way it's sorted (as far as I can see); could you give an example of where the comparison step actually matters?

– Kusalananda
2 days ago














also let's know how first row is generated in your expected output since as I understood next lines are produced with following 3rd column of each row where that appeared in first column of other line (or lines? Is value of 3rd column in each row unique within a file? ) , so how first line is come there is matter. please edit your question for clarification.

– αғsнιη
2 days ago






also let's know how first row is generated in your expected output since as I understood next lines are produced with following 3rd column of each row where that appeared in first column of other line (or lines? Is value of 3rd column in each row unique within a file? ) , so how first line is come there is matter. please edit your question for clarification.

– αғsнιη
2 days ago














First row always starts with value SQL.

– Sekhar
2 days ago





First row always starts with value SQL.

– Sekhar
2 days ago













@Sekhar That does not help in understanding the ordering of the lines in the output. I would have assumed that the lines were sorted on the last column, but if you say that the first line always should start with SQL, then it becomes unclear whether a line with something like Access or some other string in the last column should be put just below that or above it. Please edit your question to clarify, taking my other comment into consideration.

– Kusalananda
2 days ago





@Sekhar That does not help in understanding the ordering of the lines in the output. I would have assumed that the lines were sorted on the last column, but if you say that the first line always should start with SQL, then it becomes unclear whether a line with something like Access or some other string in the last column should be put just below that or above it. Please edit your question to clarify, taking my other comment into consideration.

– Kusalananda
2 days ago










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.