Make autogen
This commit is contained in:
parent
9a00ee2118
commit
f36be74fe5
3 changed files with 35 additions and 16 deletions
18
acatcher/mkacatcher
Executable file
18
acatcher/mkacatcher
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
NUM=0
|
||||
while read FOO; do
|
||||
if ! echo $FOO | grep -q ^#; then
|
||||
HOST="`echo $FOO | cut -d\| -f3`"
|
||||
MAC="`echo $FOO | cut -d\| -f1 | tr '[A-Z]' '[a-z]'`"
|
||||
IP="`echo $FOO | cut -d\| -f2`"
|
||||
if ! echo $HOST | egrep -q "(server|spare)"; then
|
||||
>&2 echo found host $HOST mac $MAC ip $IP num $NUM
|
||||
HEX="`echo "obase=16; $NUM" | bc | tr '[A-Z]' '[a-z]'`"
|
||||
echo "\"[$HEX] $HOST\","
|
||||
NUM=$((NUM+1))
|
||||
elif echo $HOST | grep -q server; then
|
||||
>&2 echo found server at ip $IP
|
||||
echo $IP > SERVERIP
|
||||
fi
|
||||
fi
|
||||
done < $HOME/Dropbox/CAMS > acatcher.cxx.inc
|
Loading…
Add table
Add a link
Reference in a new issue