![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to print script output to screen and file | orahi001 | UNIX for Dummies Questions & Answers | 10 | 01-16-2009 01:47 AM |
| Terminal Output to a File ?? | varungupta | UNIX for Advanced & Expert Users | 2 | 01-28-2008 03:24 PM |
| Putting screen output in a log file | nsutti | Shell Programming and Scripting | 5 | 11-06-2007 05:47 PM |
| stuborn screen sessions | sharanbr | UNIX for Dummies Questions & Answers | 0 | 10-23-2007 12:28 PM |
| terminal sessions and certs | hu$h | UNIX for Dummies Questions & Answers | 2 | 05-16-2006 12:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Output terminal sessions to screen and log file
I would like to use a terminal session to ssh to switches and routers. I need to capture data while logged into switches to a file I can email for troubleshooting.
I use termial to log into Cisco switch, run the sh tech command, and then sent the output to cisco. Is there a way to run a script which will allow me to capture the sh tech output to a file. I am currently using the tcsh shell. I am new to shell scripting so a good explaination would be greatly appreciated. |
|
||||
|
Quote:
maybe script logfile.log ssh router.myhost commands... exit exit (from script) I have not used it much though. |
|
||||
|
sh run | tee tftp://192.168.1.1/tftpboot/sh.run-confg
you have to create the sh.run-confg file on the tftpboot folder with write access sh run | tee /append ftp://user ass@ftp.xxx.com/sh.run.comappand (append to the given FILEs, do not overwrite for the mail application you have to use tcl script router#tclsh Cisco IOS Scripting with Tcl - Cisco Systems |
|
||||
|
Thank you!
I just wanted to send a personal thanks to Juhanitali for posting his "Script" solution. Took me 30 seconds to do a google search and I found your simple but power suggestion & solution. Has saved me HOURS.
Thanks for the post and extremely simple, yet POWERFUL solution. Best regards, Razer. Toronto - Canada. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|