Re: Bash scripting help...

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

 



On Mon, 2006-08-07 at 23:26 +0200, Marko Vojinovic wrote:

> # arping -f -I eth0 $ipnumber | grep Unicast
> Unicast reply from 10.0.0.3 [00:0C:29:C8:DE:E2]  1.040ms
> 
> but I am over my head in extracting just the number. I guess awk is the
> tool, but the man page is not very illustrative and I do not have
> time/patience to learn to program in 'awk language' in order to do
> this thing. And C would probably be an overkill... :-)

	I'm sure you got a bazillion answers to this alreadybut just for fun
this is one way to do it (though up in less than 30 seconds) -

# arping -f -I eth0 $ipnumber | grep Unicast | awk '{print $5}' | tr -d /\[\]/

	No, it's not the best way to do it, but I like sticking awk in anywhere
I can regardless of necessity.  :-)

-- 
Boring Home Page - http://www.webtrek.com/joe
See my blog, sumo game ranks and other interesting junk

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux