Newest Downloads

Mar.08

  [zenoss@zenoss2 ~]$ python Zenoss_Template_Manager.py -husage: Examples: python Zenoss_Templa...

Feb.01

python queryns.py -husage: queryns.py [options] arg --username=username --password=password --net...

Advance Linux HowTo's
Cisco OSPF Expect Script
Linux HowTo's - Advance Linux HowTo's
Written by Keith Short   
Tuesday, 08 September 2009 12:11

This Expect script takes as it's argument, the IP Address of an IOS device that is using AAA Authentication (Username/Password), and returns the OSPF Neighbors of the device.
Usage: ospf_neighbors_script ip address
The script also creates a file with the OSPF Neighbors in the directory it's run from. The format is "ip address-ospf_neighbors",
 Download get_ospf_neighbor
File Title:get_ospf_neighbor (Details)
File Type:exp
File Version:1.0
File Size:1.57 Kb
License:
File Author:Keith Short
File HomePage:
Downloads:24
Rating: ( Votes)
Your Vote:
kshort@LinuxStudent:~$ ospf_neighbors_script 10.255.0.26
Username? kshort
Password?
Trying 192.168.0.26...
Connected to 192.168.0.26.
Escape character is '^]'.

User Access Verification

Username: kshort
Password:

Test-Router#terminal length 0
Test-Router#sho ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       0   FULL/  -        00:00:38    192.168.0.85     Serial1/0.2
192.168.2.1       0   FULL/  -        00:00:38    192.168.0.25     Serial1/0.1
192.168.3.1       1   FULL/BDR        00:00:39    192.168.2.70     GigabitEthernet0/1
192.168.4.1       1   FULL/BDR        00:00:38    192.168.2.66     GigabitEthernet0/0
Test-Router#


Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Last Updated on Thursday, 10 September 2009 09:27
 
HowTo Remaster a LiveCD or LiveDVD using SLAX
Linux HowTo's - Advance Linux HowTo's
Written by linuxdynasty   
Tuesday, 16 September 2008 14:20

The other day I had to come up with a way to transfer a Solaris Express nv97 DVD 3G image to remote locations while not using the network. The reason for this is, I needed to perform a LiveUpgrade on over 700 boxes and each being at a different locations. So I said to myself I guess I can put this image on a custom LiveDVD... But then I said to myself, which Linux LiveCD/DVD distro will I use???? It has to be small enough so that I can fit the Solaris Express nv97 image as well as the LiveCD Image.



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Last Updated on Tuesday, 16 September 2008 22:41
Read more...
 
Expect Script to find MAC Address on Cisco IOS Devices
Linux HowTo's - Advance Linux HowTo's
Written by Keith Short   
Tuesday, 19 August 2008 12:40

This script will find a MAC address on a Cisco IOS based switch.

Here's what you'll see when the switch is successful and unsuccessful finding the MAC address.

Notice it prompts you for your username and password. This script is integrated with the Expect Telnet script on this site.

 

kshort@LinuxStudent:~$ ./findMACaddress_final 10.10.12.1
Enter the MAC Address? 0013.72fb.3050
Username? kshort
Password?

-------------------Here Are the The Results of Your Search------------------

vlan   mac address     type    learn     age              ports
------+----------------+--------+-----+----------+--------------------------
Supervisor:
*   95  0013.72fb.3050   dynamic  Yes         65   Gi1/3



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Last Updated on Wednesday, 02 September 2009 09:00
Read more...
 
Regular Expressions and Commands HowTo
Linux HowTo's - Advance Linux HowTo's
Written by Allen Sanabria   
Sunday, 18 May 2008 16:33

There are a bunch of great regular expressions HowTo's out there..... Now you may be asking why am I creating another??? Well quite simple, I am creating this one because this is not really just a regular expression howto but more a regular expression HowTo with its everyday uses with linux/unix commands.  So it will not cover perl/python/ruby/...etc programming languages regular expressions (That will be for another tutorial :) )

To start this off I will give you a basic introduction to regular expressions using the output
of "ls" and piping it "grep" using the -oE options (The o stands for Exact match and the E stands for Extended Regular Expressions). Using "(BRE and ERE) Basic Regular Expressions and Posix Extended Regular Expressions"...

THIS IS NOT A TUTORIAL BUT A HOWTO!! So this means more examples and less explaining..

 

Anchors

What it means 

Example 

^

Start of string

ls |grep -oE "^C\w+\.jpg"
Chunka.jpg
Chunka1.jpg

$ 

End of string 

ls |grep -oE "\w+(\.jpg$)"
Chunka.jpg
Chunka1.jpg
DSCF0732.jpg

\b 

Word boundary 

ls |grep -oE "\bChunka\b\.jpg"
Chunka.jpg

\< 

Start of word 

ls |grep -oE "\<Ch\w+\.jpg"
Chunka.jpg
Chunka1.jpg

\> 

End of word 

ls Scripts/Python/ |grep -oE "\w+\>\.py"
xen_mac_generate.py 



 Character Classes 


What it means 

Example 

\w 

Word 

ls | grep -oE "\w"
C
C

\W 

Non word 

ls |grep -oE "\W"
.
.



Quantifiers 

what it means 

example 

* 

zero or more times

ls | grep -oE "\w*.jpg"
Chunka.jpg
Chunka1.jpg
DSCF0732.jpg

+ 

one or more times 

ls | grep -oE "\w+"
Chunka
Chunka1
DSCF0732

? 

matches either once or zero times

ls | grep -oE "Chunka1?.jpg"
Chunka.jpg
Chunka1.jpg

{2} 

Exactly 2 times

ls | grep -oE "(^C{2}h\w+.jpg)"
CChunka.jpg

{1,}

1 or more times

ls | grep -oE "(^C{1,}h\w+.jpg)"
CChunka.jpg
CCChunka.jpg
Chunka.jpg
Chunka1.jpg
Chunka11.jpg

{1,2} 

1 through 2 times

ls | grep -oE "(^C{1,2}h\w+.jpg)"
CChunka.jpg
Chunka.jpg
Chunka1.jpg
Chunka11.jpg

 

Special Characters 

What it means 

Example 

\n 

New line 

 

\r 

Carriage return 

 

\t

Tab 

 

\v


Vertical tab 

 

\f

Form feed 

 

 

  




Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Last Updated on Saturday, 24 May 2008 18:58
 
Screen HowTo Part 2
Linux HowTo's - Advance Linux HowTo's
Written by Allen Sanabria   
Saturday, 17 May 2008 10:39

In the the first part of this HowTo,  I gave you the bare minimum to get Screen working
and how to use it on a day to day basis.... This time around I will show you some
of the advanced features of screen that may make your life easier in the terminal..

Before continuing this HowTo please read Part 1 if you do not have previous experience with screen.
So lets start this HowTo with some more Screen Commands...

 



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Last Updated on Tuesday, 20 May 2008 07:15
Read more...
 
<< Start < Prev 1 2 3 Next > End >>

Page 1 of 3