The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 11-16-2008
elbombillo elbombillo is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 48
head /etc/resolv.conf |grep nameserver| awk '{print $2}'

I get:
68.28.58.92
68.28.50.91


but how can I create two variables
dns1=68.28.58.92
dns2=68.28.50.91

Thanks again.