How do I redirect output to a file and to the console screen?



Hi there,

I'm doing some TELNET and FTP sessions with my scripts. I need to
redirect all the output (and not just what I print) to an output file,
but still be able to see the session in process on the console.

The Console screen is of less importance, so I could give it up, but
what I'm looking for is a way to see all the interaction with the
remote seesions on a file, that all the console data was redirected to
it from within the script file.

P.S. - the command "python script_file > output_file" is not from
within the file, so it won't work for me.

Thank you (-:

.



Relevant Pages

  • Re: Post with redirect?
    ... redirection...and how to do a post from php (which you said was ... I said it was impossible to redirect from PHP. ... my claim is NOT that you can redirect post data. ... And all you do is post scripts you've collected off the internet. ...
    (comp.lang.php)
  • Re: finding group user belongs too
    ... Thank you all for your input, have tried all the scripts, and would like to ... aFile.Delete ' now delete the output file. ... Function DisplayGroups (strObjectADsPath, strSpaces, dicSeenGroup) ... colGroups = Array) ...
    (microsoft.public.scripting.vbscript)
  • Bypassing Keyboard-Interactive Authentication:
    ... > sign the session identifier and sends the result to the server. ... the "-n -i" option that allows me to redirect the login prompt to ... This feature is essential because these scripts ... because <sftp> resists all efforts on my part to redirect the ...
    (comp.security.ssh)
  • Re: Question about StringIO
    ... > I have some sql scripts to create tables, indexes, procedures, etc. ... > string I want to pass. ... > redirection, redirect to a file, or redirect to /dev/null. ...
    (comp.lang.python)
  • Re: Javascript outside of tags
    ... object redirect in the tag's onload() event. ... The redirect does not work. ... would the browser run these scripts before the document onload ...
    (comp.lang.javascript)