Linux question.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PaulBlay
    Knight
    • Jan 2009
    • 657

    Linux question.

    It is possible to copy the entire text content of a terminal window to the clipboard?

    Or is it possible to re-direct the output of the 'make' command to a text file?

    I want to check through the compiler warnings, but it's far too long to manually select the whole output.

    ****
    Hi, I'm the Angband SVN virus. Copy me into your forum posts and get Angband SVN to show up on Google.
    Last edited by PaulBlay; May 17, 2009, 19:52.
    Currently turning (Angband) Japanese.
  • PowerDiver
    Prophet
    • Mar 2008
    • 2820

    #2
    Originally posted by PaulBlay
    It is possible to copy the entire text content of a terminal window to the clipboard?

    Or is it possible to re-direct the output of the 'make' command to a text file?

    I want to check through the compiler warnings, but it's far too long to manually select the whole output.
    There is a command called "script". Use it, and everything that is echoed to the terminal is also put into a file called "typescript". That continues indefinitely until you exit with control-D.

    Standard output redirection should work as well. I don't know whether compiler warnings are directed to stdout or stderr but you could always redirect them both.

    Comment

    • pav
      Administrator
      • Apr 2007
      • 793

      #3
      make | tee /tmp/file_with_output.txt

      See the elves and everything! http://angband.oook.cz

      Comment

      • takkaria
        Veteran
        • Apr 2007
        • 1951

        #4
        Originally posted by PaulBlay
        It is possible to copy the entire text content of a terminal window to the clipboard?

        Or is it possible to re-direct the output of the 'make' command to a text file?

        I want to check through the compiler warnings, but it's far too long to manually select the whole output.
        "make 2&>errors" will redirect all make's output to 'errors'.
        takkaria whispers something about options. -more-

        Comment

        • PaulBlay
          Knight
          • Jan 2009
          • 657

          #5
          Originally posted by takkaria
          "make 2&>errors" will redirect all make's output to 'errors'.
          Got a "2 not recognized target". (Or similar) error message.

          make >errors
          redirect all the output _except_ the error messages. Anyway I got them copied in the end. No doubt it will get smoother with practise.
          Currently turning (Angband) Japanese.

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9634

            #6
            Originally posted by PaulBlay
            Got a "2 not recognized target". (Or similar) error message.
            Different shells handle this differently (end knowledge).
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              On csh/tcsh, you need to use >&1 > make.out. (I don't know if it's possible to redirect stderr only.)

              csh is pretty much obsolete anyway. Use bash. Then

              make 2> errors will work. make 2>&1 > make.out redirects everything. This is usually what I use.

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎