Sponsored Content
Top Forums Shell Programming and Scripting Dhcp.config file scripting assistance Post 302728897 by Yoda on Thursday 8th of November 2012 04:00:59 PM
Old 11-08-2012
Try this:-
Code:
MAX_IPADD=101
MAX_COUNT=88

IPADD=1
COUNT=1

while read mac_addr
do

if [ ${IPADD} -gt ${MAX_IPADD} ]
then
        break;
else
{
echo "host somehost${COUNT} {
option host-name somehost${COUNT};
hardware ethernet ${mac_addr}
fixed-address 192.168.100.${IPADD};
{"
} >> output.txt

IPADD=`expr ${IPADD} + 1`
COUNT=`expr ${COUNT} + 1`
fi

done < MAC.txt

I hope this helps.
This User Gave Thanks to Yoda For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

DHCP DNS Config

I'm running Solaris 9 and I need my box to request it's DNS servers off a DHCP server - can I do this? (1 Reply)
Discussion started by: Jdogg
1 Replies

2. Shell Programming and Scripting

Assistance with regex and config files

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)
Discussion started by: pryker
1 Replies

3. Shell Programming and Scripting

Scripting neophyte needs file manipulation assistance

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)
Discussion started by: LambdaCalculus
0 Replies

4. Shell Programming and Scripting

Assistance in Perl scripting

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)
Discussion started by: deo_kaustubh
2 Replies

5. IP Networking

DHCP config issue?

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)
Discussion started by: macwunder
1 Replies

6. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

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)
Discussion started by: muraliinfy04
4 Replies

7. Solaris

DHCP config struggles (serious struggle, or maybe just being stupid ...)

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)
Discussion started by: larske
0 Replies

8. Shell Programming and Scripting

Using ii for irc chat - scripting assistance?

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)
Discussion started by: spartan2006
3 Replies

9. Shell Programming and Scripting

sed newbie scripting assistance

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)
Discussion started by: mthespian
3 Replies

10. Shell Programming and Scripting

Noob to scripting needs some assistance

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)
Discussion started by: jkeeton81
1 Replies
PYFORMEX(1)						      text and X11 processing						       PYFORMEX(1)

NAME
pyformex - generate and transform 3D geometry using Python scripts SYNOPSIS
pyformex [options] [ [ file [args] ] ...] DESCRIPTION
This manual page documents briefly the pyformex command. pyFormex is a program for generating, transforming and manipulating large geometrical models of 3D structures by sequences of mathematical operations. Thanks to a powerful (Python based) scripting language, pyFormex is very well suited for the automated design of spatial frame structures. It provides a wide range of operations on surface meshes, like STL type triangulated surfaces. There are provisions to import medical scan images. pyFormex can also be used as a pre- and post-processor for Finite Element analysis programs. Finally, it might be used just for creating some nice graphics. Using pyFormex, the topology of the elements and the final geometrical form can be decoupled. Often, topology is created first and then mapped onto the geometry. Through the scripting language, the user can define any sequence of transformations, built from provided or user defined functions. This way, building parametric models becomes a natural thing. While pyFormex is still under development, it already provides a fairly stable scripting language and an OpenGL GUI environment for dis- playing and manipulating the generated structures. OPTIONS
The pyformex command follows the usual GNU command line syntax, with long options starting with two dashes ('-'). The non-option arguments are filenames of existing pyFormex scripts, possibly followed by arguments, that will be executed by the pyFormex engine. If a script file uses arguments, it is responsible for removing the arguments from the list. A summary of the most important options is included below. A complete overview is can be found from the 'pyformex -h' command. For a com- plete description of the use and operation of pyFormex, see the online documentation at http://pyformex.org/doc or the documentation included with the distribution. --gui start the GUI (default if no file argument is given) --nogui do not load the GUI (default if a file argument is given) --interactive, -i Go into interactive mode after processing the command line parameters. This is implied by the --gui option. --config=<file> Read configuration settings from <file>, if it exists. --nodefaultconfig Skip the default site and user config files. This option can only be used in conjunction with the --config option. --redirect Redirect standard output to the message board (ignored with --nogui) --debug display debugging info to standard output --whereami Show where the pyformex package is installed and exit --detect Show detected helper software and exit --version Show the program's version number and exit. --help, -h Show the help message and exit. SEE ALSO
http://pyformex.org/doc/ AUTHORS
pyFormex is developed by Benedict Verhegghe with the help of the other pyFormex project members: Gianluca De Santis, Francesco Iannaccone, Peter Mortier, Tomas Praet, Sofie Van Cauter, Wenxuan Zhou. AUTHOR
Benedict Verhegghe <benedict.verhegghe@ugent.be>. This manual page was written for the Debian project (and may be used by others). COPYRIGHT
GPL v3 or higher 0.1 2011-12-29 PYFORMEX(1)
All times are GMT -4. The time now is 12:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy