Re: Script help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Feb 2008, Tom Brown wrote:

> thanks for the pointers all - this was being tested on a box that
> has more than 1 NIC hence the reason for the cut.
>
> I need to get the third octect of the NIC address and depending on
> what that is a different automounter file is installed and if no
> network is recognised then a default is downloaded. I hope that
> clears up what i am trying to do and i will look at the options.

$ IP="1234.2345.3456.4578"
$ echo $IP | cut -d. -f3
3456

  by the way, i don't think it solves any of your exact problems, but

$ man ipcalc

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux