Shell Command Trick

Hi, I'm trying to see if there exists such a thing as the following:

1) Run command that prints out error log on Linux shell.
2) As the error log is being printed out, use a keyboard short-cut which pops up a new shell to continue the print-out process on that window.

I was passing by a Linux user who was doing this and it seemed like an interesting feature.

Question:
How do you seamlessly continue a text print-out process from one command shell to another?

I appreciate your response.

Comments

  • for no.1:
    #output to stdout aka chan 1
    # 2 methods: NB default is stdout (chan 1) anyway ...
    echo A 
    echo A >1
    
    # output to stderr aka chan 2
    echo B >2
    
    # output to both
    # 2>&1 => output stderr (chan 2)to same chan (&) as stdout (chan 1)
    echo C >1 2>&1
    echo C 2>&1
    
    # chan 0 is stdin
    
  • bobf12x wrote:
    #output to stdout aka chan 1
    echo A >1
    
    This will not echo to stdout, but redirect stdout to a file called '1'
    bobf12x wrote:
    # output to stderr aka chan 2
    echo B >2
    
    This will not echo to stderr, but redirect stdout to a file called '2'
    bobf12x wrote:
    # 2>&1 => output stderr (chan 2)to same chan (&) as stdout (chan 1)
    echo C >1 2>&1
    
    This will echo both stdin and stdout to a file called '1' (redirect stderr to stdout and stdout to file '1'
    )
    bobf12x wrote:
    # chan 0 is stdin
    
    Technically stdin, stdout and stderr are not channels but filedescriptors.
Sign In or Register to comment.