parse and format IP:port currently in listen state without net tools

cat /proc/net/tcp | grep " 0A " | sed 's/^[^:]*: \(..\)\(..\)\(..\)\(..\):\(....\).*/echo $((0x\4)).$((0x\3)).$((0x\2)).$((0x\1)):$((0x\5))/g' | bash
Useful for containers and environments where you need to know if a port is currently in listen mode but you have not easy way or privileges to install net-tools like netstat or ss. "0A" is the code for listen state. The IP hex is reverse order and all in hex format.
Sample Output
0.0.0.0:111
10.174.109.1:53
127.0.0.53:53
0.0.0.0:22
127.0.0.1:631
0.0.0.0:8000

2
2020-05-23 12:36:21

What Others Think

Thankyou for the information. [url=https://travelwels.com/]https://travelwels.com/[/url] Travelling gives you the opportunity to step away from the daily grind. The new events and experiences help rewire your brain, hence boosting your mood and self-confidence. For travelling or exploring the world please go through.
TRAVELWELS · 45 weeks and 2 days ago
Thankyou for the information. https://travelwels.com/ Travelling gives you the opportunity to step away from the daily grind. The new events and experiences help rewire your brain, hence boosting your mood and self-confidence. For travelling or exploring the world please go through.
TRAVELWELS · 45 weeks and 2 days ago
Tryhttp://empirepokerschool.com/">poker training ! here you will learn not only the right, but the secrets of the masters, betting strategies, table etiquette! I promise you, you won’t regret it!
Foraes · 45 weeks ago
Thanks for sharing this wonderful information with me.
Uned1983 · 44 weeks and 6 days ago
Hello Mate - This is amazing piece of work and give me informative insights about subject matter. I would love to read more about your work to enhance my knowledge. Further, to get best Carter's Coupon Codes , please visit out website www.uttercoupons.com.
adam062 · 41 weeks and 2 days ago
Hello Mate - This is amazing piece of work and give me informative insights about subject matter. I would love to read more about your work to enhance my knowledge. Further, to get best TSplus Coupon Code , please visit out website www.uttercoupons.com.
adam062 · 41 weeks and 2 days ago
Hello Mate - This is amazing piece of work and give me informative insights about subject matter. I would love to read more about your work to enhance my knowledge. Further, to get best Promo code for stadium goods , please visit out website www.uttercoupons.com.
adam062 · 41 weeks and 2 days ago
It was great experience to read this blog and comments, and got a good solution for the problem Thanks. Earn money online in USA
Surveytoearn · 38 weeks and 4 days ago
really great and useful content, i shared some of your article in my site. Thank you Viva TV Apk
VivaTV · 34 weeks and 6 days ago
I am very happy of the owner of this blog. Because of this blog is very informative for me. I'm also happy with Siding Contractors Wilmington NC for making my exteriors look nice and durable.
scottheflin589 · 31 weeks and 3 days ago
Want to get rid of an academic burden? Just click here and know how to be a well-performing student!
reynamiller · 25 weeks and 5 days ago
great content! will recommend this site to my friends
looneyhans · 25 weeks and 2 days ago
learned alot thanks so much fencingyakimawa.com
looneyhans · 20 weeks and 5 days ago
it was really nice and helpful! dentalimplantscorpuschristitx.com
Killersmile · 20 weeks and 2 days ago
thanks alot for this breast augmentation huntington beach
looneyhans · 17 weeks and 4 days ago
thanks for the heads up! will surely take note of this eyelash extensions
idasanka · 16 weeks and 2 days ago
glad i found this site! couples counseling
idasanka · 16 weeks ago
doula colorado springs Can you tell me a bit more, please?
yeoyeo · 14 weeks and 2 days ago
thank you for this! really appreciate you doing this eat
sammm · 11 weeks and 2 days ago
We will add to the geometry dash site forum a new, more updated, and improved game system.
YoungHope · 7 weeks and 2 days ago
Thanks for sharing, I found a lot of interesting information here. Really good post, thank you very much and I hope you write more posts like this. https://beetvapp.me/ https://hax4you.me/
samajkapoor · 6 weeks ago
hello
samajkapoor · 6 weeks ago
Thanks for sharing, I found a lot of interesting information here. Really good post, thank you very much and I hope you write more posts like this. BeeTV Apk Hax4you
samajkapoor · 6 weeks ago
tgdfhj
seomind · 5 weeks and 6 days ago
A debt of gratitude is in order for sharing the information, keep doing awesome... I truly delighted in investigating your site. great asset... www.luckystrikemine.com
seomind · 5 weeks and 6 days ago
This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works www.lovingcareathome.com
seomind · 5 weeks and 6 days ago
It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I want to read more things about it! www.lovesarahbelle.com
seomind · 5 weeks and 6 days ago
The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought you have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention. www.loughborough-innovation.com" rel="nofollow">http://www.loughborough-innovation.com/">www.loughborough-innovation.com
seomind · 5 weeks and 6 days ago
I have read your excellent post. This is a great job. I have enjoyed reading your post first time. I want to say thanks for this post. Thank you... http://lotusintergate.at/">lotusintergate.at
seomind · 5 weeks and 6 days ago
This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea. www.losangeles-computer-repair.net
seomind · 5 weeks and 6 days ago
Very interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know. www.lorishealth.org" rel="nofollow">http://www.lorishealth.org/">www.lorishealth.org
seomind · 5 weeks and 6 days ago
A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one. www.log-concept.com" rel="nofollow">http://www.log-concept.com/">www.log-concept.com
seomind · 5 weeks and 6 days ago
I'm happy to see the considerable subtle element here!. www.letsdancetoo.com" rel="nofollow">http://www.letsdancetoo.com/">www.letsdancetoo.com
seomind · 5 weeks and 6 days ago
You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. http://lestratege.net/">lestratege.net
seomind · 5 weeks and 6 days ago
This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works www.leontinesbookrealm.com" rel="nofollow">http://www.leontinesbookrealm.com/">www.leontinesbookrealm.com
seomind · 5 weeks and 6 days ago
It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I want to read more things about it! www.leonhard-styline-design.com" rel="nofollow">http://leonhard-styline-design.com/">www.leonhard-styline-design.com
seomind · 5 weeks and 6 days ago
it's really cool blog. Linking is very useful thing.you have really helped www.legendaryinsights.com
seomind · 5 weeks and 6 days ago
This is an awesome motivating article.I am practically satisfied with your great work.You put truly extremely supportive data. Keep it up. Continue blogging. Hoping to perusing your next post www.legalonlinebusiness.com
seomind · 5 weeks and 6 days ago
I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts. www.lanarkshirechamber.org
seomind · 5 weeks and 6 days ago
it's really cool blog. Linking is very useful thing.you have really helped www.ladieshealthandfitnessusa.com" rel="nofollow">http://ladieshealthandfitnessusa.com/">www.ladieshealthandfitnessusa.com
seomind · 5 weeks and 6 days ago
I'm happy to see the considerable subtle element here!. www.lacrossehomeinspector.com
seomind · 5 weeks and 6 days ago
You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. www.labor4refugees.org
seomind · 5 weeks and 6 days ago
A debt of gratitude is in order for sharing the information, keep doing awesome... I truly delighted in investigating your site. great asset... www.labhomenow.com
seomind · 5 weeks and 6 days ago
This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea. www.knjcomputers.com
seomind · 5 weeks and 6 days ago
I really enjoyed reading your article. I found this as an informative and interesting post, so I think it is very useful and knowledgeable. kitchen remodeling el paso
aegyjingoo · 2 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: