Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add to the network section of conky a list of all hosts and ips for my network.

However I do not know how to format the output in a way I like.

I want

  • Live Hosts However this is on the bottom line of nmap's output)
  • host (ip)
  • host (ip)
  • and on and on...

I think there should be a max of 7 on my network. How can I do this? The output of nmap -sP looks nothing like what I want though it does have all the parts, just in the wrong order.

share|improve this question
Can someone explain awk and/or grep to the OP? – hexafraction Sep 21 '12 at 19:29
@ObsessiveFOSS You're someone! :) – SirCharlo Sep 21 '12 at 19:40
@WolfLarson Please edit your question to add the current output, and the desired output. We'll be able to help more then. – SirCharlo Sep 21 '12 at 19:41
@SirCharlo What do you mean? – hexafraction Sep 21 '12 at 20:32

If you want to work with the text output of namp, then yeah, I would reccomend looking into using grep and/or awk to shape the output. If you just want something pretty to look at, install and use zenmap.

sudo apt-get install zenmap

Then run:

sudo zenmap

It's a very nice graphical overlay for nmap and you can manipulate and navigate the map results rather nicely.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.