Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • it works, but sometimes there are duplicate IP addresses in the configuration file, and it needs to find those as well, as the duplicates have native paths. well that be a big change? Commented Sep 8, 2019 at 16:32
  • It's no change at all - best I can tell the script will behave as desired as-is. Did you try it? If there's a case it doesn't work for then include that case in the sample input/output in your question. Commented Sep 8, 2019 at 16:35
  • yes, I did try it. also the sep ----- dashes are added to the config by the system daemon, so it would be best to not print them, but let the statement print whats there. like maybe a print the next line syntax. Commented Sep 8, 2019 at 16:55
  • 1
    wrt it would be best to not print them - if you don't want them printed then don't include them in your expected output. It sounds like you have a few important things not covered in your question so update your question to contain all relevant information and an accurate example. Commented Sep 8, 2019 at 17:15
  • those are pretty much all the important details to add. originally I just wanted to use a one liner with the IF ELSE to keep it simple for other users. Is that possible? or is the IF ELSE statement not capable of having the ELSE use the $ip variable match Commented Sep 8, 2019 at 19:49