Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-17-2006, 05:38 AM   #1
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:


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, 11:22 AM   #2
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


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

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

All times are GMT -5. The time now is 10:27 AM.

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