Sponsored Content
Top Forums Shell Programming and Scripting Bash: capturing *Anything* which showed on screen Post 302490663 by siavash on Tuesday 25th of January 2011 11:55:42 AM
Old 01-25-2011
Question Bash: capturing *Anything* which showed on screen

Hi,

I have a simple question about I/O redirection. the question is:
"How can I redirect all characters from a Bash screen to a file?"

Let me describe a little more: I know about I/O Redirection in Bash.
and also about stdin/stdout/stderr. something like: # ls 2>&1 1>ls.out

But! sometimes it's not possible to capture output of some Apps.
SSH is a good sample. I tried to capture a complete output of an
ssh session but it was not possible! when you are trying to do an
ssh for the first time, it will shows a message like this:

Code:
 
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is ****
Are you sure you want to continue connecting (yes/no)?

And, this message couldn't be captured!

Any suggestions would be appreciated Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash overwrites data on screen!!

hi everybody, when i run and compile this: printf("test"); fflush(stdout); nothing appears on screen. if i try this: ___________________________________ printf("test"); fflush(stdout); sleep(10); ___________________________________ then i can see the output "test"... for 10... (4 Replies)
Discussion started by: brain_processin
4 Replies

2. AIX

used PPs not match the total disk space showed by df

Hi, I see from lsvg the total used PPs is 1050 (67200 megabytes), but when I check the disk space with df command I can only see 31G total space, can somebody tell how this come? Thanks! Victor # lsvg rootvg # lsvg rootvg VOLUME GROUP: rootvg VG IDENTIFIER: ... (2 Replies)
Discussion started by: victorcheung
2 Replies

3. Shell Programming and Scripting

Logging ALL standard out of a bash script to a log file, but still show on screen

Is it possible to store all standard-out of a bash script and the binaries it calls in a log file AND still display the stdout on screen? I know this is possible to store ALL stdout/stderr of a script to a single log file like: exec 1>&${logFile} exec 2>&1 But running a script with the... (3 Replies)
Discussion started by: ckmehta
3 Replies

4. Shell Programming and Scripting

Bash script [Press Tab] Screen Blank..

Dear Member, OLD Question --> disable-completion not solved My bash Menu script ping process problem. If ping still running and users press SCREEN is Blank... Cant Members help me.. kill signal or others scripting for my case, btw i use Linux.. Thanks, Rico My Bash Script : ... (1 Reply)
Discussion started by: carnegiex
1 Replies

5. Shell Programming and Scripting

Clear Screen Command for BASH shell

I am unable to use clear or cls command on bash shell. I have recently installed Cygwin and am using that for practicing unix commands. I see that I can use Ctrl + L to clear the screen. I created an alias in my .bashrc to do the same as alias cls='^L' This is how i defined other aliases ... (4 Replies)
Discussion started by: erora
4 Replies

6. Shell Programming and Scripting

Run a bash script, display on the screen and save all information in a file including error info

Hi all, How to: Run a bash script, display on the screen and save all information in a file including error information. For example: I have a bash script called test.sh now I want to run the test.sh and display the output on the screen and save the output including error info to a file. ... (1 Reply)
Discussion started by: Damon sine
1 Replies

7. Programming

this code for addind polynomials using linked lists showed segmentation error..any help pls..

the error occurs in the function() "add" used... #include<stdio.h> #include<malloc.h> struct node { int exp; int coef; struct node * link; }; struct node * create_list(struct node *,int,int); void display(struct node *); struct node * add(struct node *,struct node *); ... (3 Replies)
Discussion started by: mscoder
3 Replies

8. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

9. UNIX for Dummies Questions & Answers

The block size in my quota is showed wrong

The block size in my home directory is showed wrong when I use "quota" command. It shows I use 1.2 gb ( about 1200000) while the real size in my directory which I use "du" command is 96 MB I really confused. (0 Replies)
Discussion started by: thsecmaniac
0 Replies

10. UNIX for Beginners Questions & Answers

Help with bash escaping while using screen command

Hello, everyone. I'm currently trying to write a command system for a Minecraft server using screen. Here are the scripts I'm currently using. 0.sh #!/bin/bash screen -S Test114 -dm java -Xmx4G -jar server.jar nogui 1.sh #!/bin/bash args="$@" args2="${args@Q}" #args3=`printf '%q\n'... (2 Replies)
Discussion started by: Develon
2 Replies
SCREEN-IR(1)							   Axel Beckert 						      SCREEN-IR(1)

NAME
screen-ir -- Interactively Reattach to GNU Screen sessions SYNOPSIS
screen-ir [additional screen options ...] DESCRIPTION
screen-ir uses iSelect(1) to interactively reattach to running screen sessions. Use the screen option -d or -D if you want to reattach to attached screen sessions. Use the screen option -x if you want to attach to screen sessions without detaching them. FILES
screen-ir sources ~/.screen-irrc if it exists. It recognizes two variables: The contents of SCREEN_OPTIONS is given to screen(1) as command-line options. Default is -r. Use e.g. -rd if you always want to reattach to already attached screen sessions. The contents of ISELECT_OPTIONS is given to iselect(1) as command-line options. Default is empty. Use e.g. -f if you always want to see the interactive selection, even if there's only one screen session running, i.e. you have no choice. AUTHOR
Axel Beckert <abe@debian.org> SEE ALSO
screen(1), iselect(1) EN
2011-09-04 SCREEN-IR(1)
All times are GMT -4. The time now is 10:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy