Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I want to execute [ more /etc/domainips ] commands and the results should be sort by username

Hello when i want to execute more /etc/domainips commands on my ssh, I want to get the results like = sort by username.

Hello when i execute more /etc/domainips commands on my ssh the result showed up like this

a.com: D-user
b.com: B-user
c.com: A-user
d.com: C-user

I want to get the results like this = sort by username.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

c.com: A-user
b.com: B-user
d.com: C-user
a.com: D-user

Please help me to do this.

>Solution :

Pipe the result of sort to more:

sort -k 2 /etc/domainips | more
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading