i have this piece of bash script :
internal=$(/sbin/ifconfig $adapter | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}')
$adapter="eth0"
i want to execute this until internal has the correct value
and after that i want to go to the rest of my script
Do you have any ideas how i could deal with that ?
After that i have code it in order to send the ip via sms !
Thank you in advance.
Best Answer
Try doing this :
As you can see, I use only one pipe :
|
with awk, no need more,awk
can do the whole processing.