Sponsored Content
Full Discussion: Sh vs ./
Top Forums Shell Programming and Scripting Sh vs ./ Post 302828079 by liviusbr on Monday 1st of July 2013 02:39:14 PM
Old 07-01-2013
What would be the fastest way to sort this out ?
Tried actually the following :

Code:
#!/bin/bash MAC_ADDR=`ifconfig eth0 | sed -n 's/.*HWaddr \([a-f0-9:]*\).*/\1/p'` IP=`(curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/$MAC_ADDR/local-ipv4s)` for ip in ${IP[@]:1}; do echo "Adding IP: $ip"     ip addr add dev eth0 $ip/24 done

But still getting an error..

Last edited by liviusbr; 07-01-2013 at 03:44 PM..
 
All times are GMT -4. The time now is 10:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy