Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8290129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:42:25+00:00 2026-06-08T12:42:25+00:00

Suppose I have a scenario like below : There are about 225 Computers having

  • 0

Suppose I have a scenario like below :

There are about 225 Computers having the following range of IP addresses and hostnames:-

PC-LAB         IP ADDRESS RANGE       HOSTNAME RANGE
PC-LAB1  10.11.2.01 -   10.11.2.30  ccl1pc01 - ccl1pc30
PC-LAB2  10.11.3.01 -   10.11.3.30  ccl2pc01 - ccl2pc30
PC-LAB3  10.11.4.01 -   10.11.4.45  ccl3pc01 - ccl3pc45
PC-LAB4  10.11.5.01 -   10.11.5.50  ccl4pc01 - ccl4pc50
PC-LAB5  10.13.6.01 -   10.13.6.65  ccl5pc01 – ccl5pc65

I want to write a program (in C / C++) that will take the above IP address and hostname ranges as input and create two separate files, one with 225 entries of IP
addresses and another with 225 entries of hostnames..

Then the program will figure out which of these machines are up and which are down and then create two files one containing
hostname and IP addresses of the systems which are UP and another which are DOWN.

E.g.

FILE1.down
Hostname   IP address
ccl1pc10   10.8.2.10
ccl5pc25   10.11.5.25

Note : If any ubuntu command simplifies this work..we can use that in the program for sure..!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:42:26+00:00Added an answer on June 8, 2026 at 12:42 pm

    Look at fping

    Run this command, sit back and relax:

    fping ccl{1..6}pc{01..60} 
    

    this will print a list of

    • All hosts that have a DNS name/IP record and are up
    • All hosts that have a DNS name/IP record but are down
    • All hosts that are not in the DNS (I guess you can ignore these)

    Regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just curious about a particular scenario of NAT. Let's suppose we have 4 computers
I was recently pondering the following scenario: suppose you have a huge database and
I am interested in the following scenario specifically. Suppose you have team that writes
Suppose a scenario like below : Class User {} // User has Admin Role
Suppose I have the following senario: Trunk is my main development line where programmers
Suppose we have the name written in any none-latin letters - languages, like Arabic,
Suppose I have a table: <table width=100> <tr> <td> hi i like you you
Suppose i have the following Moose package: package GSM::Cell; use Moose; has 'ID' =>
Suppose I have the following an event table with personId , startDate and endDate
i have a problem about getting order of my divs. Scenario : i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.