The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Simple grep Question
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Simple grep Question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
11-16-2008
elbombillo
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.
elbombillo
View Public Profile
Find all posts by elbombillo
Find elbombillo's past nominations received
Find elbombillo's present nominations given