1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Do this: |
5 |
|
6 |
DNS=66.119.171.10,66.119.171.11 |
7 |
|
8 |
DNS_PRIMARY=${DNS/,*} |
9 |
DNS_SECONDARY=${DNS/*,} |
10 |
|
11 |
Assuming only two DNS entries. DNS_PRIMARY should always work to get the first |
12 |
one. DNS_SECONDARY will get everything after the first. |
13 |
|
14 |
On Saturday 26 October 2002 12:00 am, gabriel wrote: |
15 |
> i'm having a horrid (but educational) time trying to get my iptables |
16 |
> firewall setup with dhcp and i have one small question to ask of you that i |
17 |
> just don't get: |
18 |
> |
19 |
> if i have a file that says: |
20 |
> |
21 |
> DNS=66.119.171.10,66.119.171.11 |
22 |
> |
23 |
> and i want those two ips assigned to the variables: $DNS_PRIMARY and |
24 |
> $DNS_SECONDARY, how do i do it? |
25 |
> |
26 |
> if this were perl, it'd be no problem but with bash it's a whole different |
27 |
> thing. care to help me out? |
28 |
> _______________________________________________ |
29 |
> gentoo-user mailing list |
30 |
> gentoo-user@g.o |
31 |
> http://lists.gentoo.org/mailman/listinfo/gentoo-user |
32 |
|
33 |
- -- |
34 |
Pat Double, double@×××××××××.com |
35 |
"In the beginning God created the heaven and the earth." |
36 |
-----BEGIN PGP SIGNATURE----- |
37 |
Version: GnuPG v1.0.7 (GNU/Linux) |
38 |
|
39 |
iD8DBQE9uinfdOmLNuoWoKgRAiuOAJ4tA6/7WmBSl8qKC7cA/lndlihbkACcCEzw |
40 |
bsCv3yGwkVap62KulNR9gXY= |
41 |
=Jya1 |
42 |
-----END PGP SIGNATURE----- |