Sponsored Content
Full Discussion: Grep on console output
Top Forums Shell Programming and Scripting Grep on console output Post 302550064 by puneet1984 on Wednesday 24th of August 2011 01:50:03 PM
Old 08-24-2011
Good morning GP,

rsh and rlogin are both not an option for me. I talked with the Admin as you suggested. Trouble is that this is for a server which runs the power supply for a switch and only supports telnet.

Cheers,
Puneet

---------- Post updated at 12:50 PM ---------- Previous update was at 12:48 PM ----------

Quote:
Originally Posted by frank_rizzo
if you must use telnet you can automate this with the Expect language.
I did that. However, I am having trouble running an if statement with expect.
https://www.unix.com/shell-programmin...ct-script.html

Any thoughts?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

console output messages

could someone please tell me how to stop error messages being displayed to the console port. Currently, error messages are streaming to the console and I ant do anything. many thanks..... (2 Replies)
Discussion started by: boristhespider
2 Replies

2. Programming

Reading console output

I am writing a program that uses system() to pass commands to the command interpreter. Is there a way to read the output that the commands produce? (1 Reply)
Discussion started by: Blaster999
1 Replies

3. UNIX for Dummies Questions & Answers

Eleminating output to console

I am running Shorewall firewall config program to utilize iptables on a Debian 3.3.5 system. This system is setup for a getway/router. I am getting a message: Shorewall:bogons:Drop:IN=eth0 OUT= MAC+ mac address of eth0 SRC:someinternetIP DST=MYIPADD LEN=61 TOS+0x00 PREC=0x00 TTL=114 ID=6673... (3 Replies)
Discussion started by: pflink
3 Replies

4. Shell Programming and Scripting

output console problem

kill -s KILL 0 ----------------------- ----------------------- i have used this command in a script...it is showing "killed" in output console. i don't want that.plz help what to do.i have tried --kill -s KILL 0 >/dev/null it is still showing "killed" in the output console...what to do? (1 Reply)
Discussion started by: arghya_owen
1 Replies

5. UNIX for Advanced & Expert Users

Changing the appearance of an Output in console

I want to change the appearance of a message I got in UNIX console. Eg: In console: "no server running" I need it as "****no server running*****". Thanks in advance. (3 Replies)
Discussion started by: thomaa80
3 Replies

6. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

7. Shell Programming and Scripting

Redirecting output to both console and to a file

Hi All, Is there a way in Bash we can redirection some output to both console and the file at the same time. ~Parag (2 Replies)
Discussion started by: paragkalra
2 Replies

8. Solaris

No Console Output

Hey everyone I have a sparc enterprise T2000 I'm trying to install solaris 10 on. The only way I can connect to it is the SER MGT console, but I'm not getting anything to display (in Hyper terminal, or PUTTY) when I boot it. Upon googleing, all I get back is "No output may have been generated.... (4 Replies)
Discussion started by: goodvikings
4 Replies

9. Shell Programming and Scripting

[Solved] Writing output to the console

Hi All, I have written one script in which am writting the result to the log file. I want to display the results on the console also if ; then echo "$result doesnot match with the host file">>InputHostsFileErrors.txt else echo "$result input matches with the host... (7 Replies)
Discussion started by: sharsour
7 Replies

10. Shell Programming and Scripting

Output to console and to log

I have a menu based script where user will select different action via displayed menu. I want to log all the action or say whatever displayed on screen to a log file and want to achieve with in the same script. i tried named pipe as below.. logfile=mylogfile mkfifo ${logfile}.pipe... (3 Replies)
Discussion started by: vidyadhar85
3 Replies
console(n)						       Tk Built-In Commands							console(n)

__________________________________________________________________________________________________________________________________________________

NAME
console - Control the console on systems without a real console SYNOPSIS
console subcommand ?arg ...? _________________________________________________________________ DESCRIPTION
The console window is a replacement for a real console to allow input and output on the standard I/O channels on platforms that do not have a real console. It is implemented as a separate interpreter with the Tk toolkit loaded, and control over this interpreter is given through the console command. The behaviour of the console window is defined mainly through the contents of the console.tcl file in the Tk library. Except for TkAqua, this command is not available when Tk is loaded into a tclsh interpreter with "package require Tk", as a conventional terminal is expected to be present in that case. In TkAqua, this command is ony available when stdin is /dev/null (as is the case e.g. when the application embedding Tk is started from the Mac OS X Finder). console eval script Evaluate the script argument as a Tcl script in the console interpreter. The normal interpreter is accessed through the consolein- terp command in the console interpreter. console hide Hide the console window from view. Precisely equivalent to withdrawing the . window in the console interpreter. console show Display the console window. Precisely equivalent to deiconifying the . window in the console interpreter. console title ?string? Query or modify the title of the console window. If string is not specified, queries the title of the console window, and sets the title of the console window to string otherwise. Precisely equivalent to using the wm title command in the console interpreter. ACCESS TO THE MAIN INTERPRETER
The consoleinterp command in the console interpreter allows scripts to be evaluated in the main interpreter. It supports two subcommands: eval and record. consoleinterp eval script Evaluates script as a Tcl script at the global level in the main interpreter. consoleinterp record script Records and evaluates script as a Tcl script at the global level in the main interpreter as if script had been typed in at the con- sole. ADDITIONAL TRAP CALLS
There are several additional commands in the console interpreter that are called in response to activity in the main interpreter. These are documented here for completeness only; they form part of the internal implementation of the console and are likely to change or be mod- ified without warning. Output to the console from the main interpreter via the stdout and stderr channels is handled by invoking the tk::ConsoleOutput command in the console interpreter with two arguments. The first argument is the name of the channel being written to, and the second argument is the string being written to the channel (after encoding and end-of-line translation processing has been performed.) When the . window of the main interpreter is destroyed, the tk::ConsoleExit command in the console interpreter is called (assuming the con- sole interpreter has not already been deleted itself, that is.) DEFAULT BINDINGS
The default script creates a console window (implemented using a text widget) that has the following behaviour: [1] Pressing the tab key inserts a TAB character (as defined by the Tcl escape.) [2] Pressing the return key causes the current line (if complete by the rules of info complete) to be passed to the main interpreter for evaluation. [3] Pressing the delete key deletes the selected text (if any text is selected) or the character to the right of the cursor (if not at the end of the line.) [4] Pressing the backspace key deletes the selected text (if any text is selected) or the character to the left of the cursor (of not at the start of the line.) [5] Pressing either Control+A or the home key causes the cursor to go to the start of the line (but after the prompt, if a prompt is present on the line.) [6] Pressing either Control+E or the end key causes the cursor to go to the end of the line. [7] Pressing either Control+P or the up key causes the previous entry in the command history to be selected. [8] Pressing either Control+N or the down key causes the next entry in the command history to be selected. [9] Pressing either Control+B or the left key causes the cursor to move one character backward as long as the cursor is not at the prompt. [10] Pressing either Control+F or the right key causes the cursor to move one character forward. [11] Pressing F9 rebuilds the console window by destroying all its children and reloading the Tcl script that defined the console's be- haviour. Most other behaviour is the same as a conventional text widget except for the way that the <<Cut>> event is handled identically to the <<Copy>> event. EXAMPLE
Not all platforms have the console command, so debugging code often has the following code fragment in it so output produced by puts can be seen while during development: catch {console show} SEE ALSO
destroy(n), fconfigure(n), history(n), interp(n), puts(n), text(n), wm(n) KEYWORDS
console, interpreter, window, interactive, output channels Tk 8.4 console(n)
All times are GMT -4. The time now is 07:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy