LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-17-2006, 04:38 AM   #1
kharerohit
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Rep: Reputation: 0
Need help in some scripting related to router information gathering.


I have written script for gathering information from the router shown as below:

#!/bin/sh

USERID=
PWD=
PWD1=
dir=`pwd`
ip=
intface=
DATE=`date +'%m%d'`
Time=`date +'%H%M'`
(echo "$USERID";\
echo "$PWD";\
echo "en";\
echo "$PWD1";\
echo "sh ip cache flow";\
echo "q";\
sleep 30 )| telnet $ip > $dir/info$ip$DATE$Time.txt

But through this I can run only single command or set of commands in same file at one logging into router.

Can anyone help how to get the result from the router for different commands in different file without logging again and again into router?
 
Old 03-17-2006, 10:22 AM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Chain all command using cmd1;cmd2;cmd3 format or store script on router itself
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gathering post breach information on linux xxx_anuj_xxx Linux - Security 3 11-12-2005 10:08 AM
Gathering computer system (linux )information in C minil Programming 2 03-09-2005 05:47 AM
Information Gathering xathras Linux - Networking 4 06-28-2004 01:23 PM
Information related to RAW partition RajaRC Red Hat 4 11-06-2003 10:18 PM
Information related to RAW partition RajaRC Linux - General 1 09-26-2003 05:41 PM


All times are GMT -5. The time now is 08:50 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration