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

  • SEARCH
  • Home
  • 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 7088791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:50:39+00:00 2026-05-28T07:50:39+00:00

Given the following example file: host wallmount { option root-path iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.wall_mount; hardware ethernet 00:15:c5:71:b9:68;

  • 0

Given the following example file:

host wallmount {
    option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.wall_mount";
    hardware ethernet 00:15:c5:71:b9:68;
    }

host netbook {
    option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.netbook";
    hardware ethernet 00:21:70:bb:4e:95;
    }

host laptop {
    option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.laptop";
    hardware ethernet 00:1b:38:4c:62:40;
    }

Would it be possible to take a known “hostname” (eg. “wallmount”) and remove it’s entire declaration automatically?

P.S. This is a DHCP config file under Linux… I don’t know if that helps or not.

  • 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-05-28T07:50:39+00:00Added an answer on May 28, 2026 at 7:50 am

    I’d do it with sed, which can be as simple as:

    /host wallmount/,/}/ d
    

    This is not going to be completely robust (because it does not fully understand all the syntax that the real parser of your config probably does), but if your inputs are pretty regular as your example is, it should work fine.

    In case you don’t know sed, here’s how you’d edit a file in place using the above command:

    sed -i '/host wallmount/,/}/ d' thefile.cfg
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the URL (single line): http://test.example.com/dir/subdir/file.html How can I extract the following parts using
Given the following XML file: <?xml version=1.0 encoding=UTF-8?> <process name=TestSVG2 xmlns=http://www.example.org targetNamespace=http://www.example.org xmlns:xsd=http://www.w3.org/2001/XMLSchema> <sequence>
For instance, given the following data file (x^2 for this example): 0 1 4
Given the following example (using JUnit with Hamcrest matchers): Map<String, Class<? extends Serializable>> expected
Given the following example data: Users +--------------------------------------------------+ | ID | First Name | Last
Given the following HTML example... <div id='div1'>div one</div> <div id='div2'>div two</div> ...I found that
I want to Make selenium script which move slider given on following site Example
I was following the example given in the OpenCV for video displaying, just took
In the following contrived example, data is given a warning due to it being
This is just an example, but given the following model: class Foo(models.model): bar =

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.