Hello everyone! I am brand new at this forum thing and wanted to thank all of you for your time and help in advance for helping me troubleshoot my issue.
I am fairly new to shell scripting and scoured the entire internet to find a solution for my issue to no avail and hope you're able to help.
I'm trying to create a dhcp.config file as listed below:
The script works well by incrementing the number for the hostname by the variable $count AND incrementing the fixed-address by 1 with $ipadd. However, my dilemma is trying to get the hardware MAC address to change with being fed from another file called MAC.txt.
The MAC.txt file contains MAC addresses for the clients. Example looks like this:
=======================================
=======================================
And so on...
I looked everywhere to find out how I can take the text from this file and put it in place of where my MAC address is inside of the "dhcp.config" script I created.
So basically I would like this to happen:
========================================
=========================================
And so on... MAC addresses all incrementing with the hostname and fixed-address in succession.
Clear as mud? :-) I've been exploring with sed and awk, believing there is a way to do it. To be honest, I am not at that experience level and lack the knowledge and experience to perform those operations as of yet. But learning more and more every day! How could I not since sed is awesome and my name just happens to be Sed.
I am at a wall right now and am stuck...it's not a very good feeling :P I know this can be done and I've worked so hard to find a solution, but am limited by knowledge.
If anyone is able to help me out with this, I would be so appreciative and thankful. I already am by you taking a look at this to begin with. I really hope someone can help and I will check back here for a solution if anyone was able to create one. Thank you all very much in the meantime!
Hello,
I am in a Unix class and have been out of town. I have been tasked to generate a couple of scripts and ahve never done it before. I have a virtual machine running Ubuntu. The task is below
Prompt the system administrator for all valid input parameters
Generate a menu to ask which... (1 Reply)
Howdy folks,
I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something.
Here's a genericized version:
A text_file... (3 Replies)
I am using ii for irc on my pogoplug...
hxxp://hg.suckless.org/ii/file/d163c8917af7/FAQ
If you look at the bottom of there, it states
31 What other fancy stuff can I do with ii?
32 ----------------------------------------
33 It is very easy to write irc bots in ii:
34... (3 Replies)
I have a straaaaaaange problem with a Solaris 10 host acting as a dhcp server. I can not get an ip adress allocated even though the configuration works in an almost exact setup for another Solaris 10 host.
The <host> in question has one piece of BOOTP booting <equipment> hooked up to bge0, with... (0 Replies)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
I searched the forum and found a similar question (https://www.unix.com/ip-networking/119108-dhcpd-related-questions.html), but my config is already utilizing the suggested fix... :(
My setup:
eth0 connected to Motorola DSL Modem via bridged mode (giving the public IP to the interface), IP... (1 Reply)
PFA file "color.txt".
Note : There is no newline character in the file. I have manually inserted the newline char to make it easy to understand.
I am expecting out in the form as specified in second file "out.txt"
I need a perl script to perform the task.
Thanks in advance. (2 Replies)
I need to write two shell scripts for an rsync backup solution. The first script will copy all backed up files into a folder named after the original folder, plus a date stamp (so e.g. if the original folder name is 'foo' and is backed up on the 10th of September, then the backup folder will be... (0 Replies)
I am trying to write a shell script that will such in data from a config file. The script should mount device nodes that are contained in a config file in the following format:
# filesystem type # read/write #device # Mount Point
xfs w ... (1 Reply)