3 # cat /etc/dhcp3/dhcpd.conf | awk '/host/&&/fixed-address/&&!/#/{gsub("host","");gsub("{","");gsub("}","");gsub("hardware","");gsub("ethernet","");gsub(";","");gsub("fixed-address","");host=$1;ip=$3}'
8 cat /etc
/dhcp
3/dhcpd.conf |
awk '
11 /fixed-address/{match($0,/fixed-address[[:space:]]*[[:digit:].]*/,a);split(a[0],b);ip[n]=b[2]}
12 END{for(i=1;i<=n;i++)if(h[i]!~/b$/){print ip[i],h[i]}} '> /etc
/hosts
13 echo "127.0.0.1 localhost" >> /etc
/hosts
19 cat /etc
/hosts |
grep -v "a" |
awk '{print$2}' |
grep node
> /opt
/cluster
/etc
/rgang
/nodes
20 cat /etc
/hosts |
awk '{print$2}' |
grep nigol
> /opt
/cluster
/etc
/rgang
/login
21 cat /etc
/hosts |
grep -v "a" |
awk '{print$2}' > /opt
/cluster
/etc
/rgang
/all
26 cat /etc
/hosts |
grep node |
awk '{print$2" np=4"}' > /opt
/cluster
/etc
/queue
/nodes
27 /etc
/init.d
/torque restart
28 rgang all
/etc
/init.d
/torque restart