5

I'm pretty new here, and I have been reading over many of the questions here, trying to answer the few I have a small bit of knowledge about. While perusing the questions, answers, and comments, I have noticed that often a person is requested to perform a few commands and post the output. While this usually helps get the question answered, it seems that some of the less experienced users may have problems cutting and pasting the output properly, or needing to pull the outputs of different commands into a single text file, etc.

One of the tools that most of us should have on our system that can make this easier is the script command. I think that it might be advantageous when wanting to ask a user to perform a series of commands, in order to troubleshoot the problem by reading the output, to ask the user to type script -c "cmd1;cmd2;cmd3" output-for-pastebin.txt, or something similar. This allows the user to have full and complete output, in the order desired, and also in a single text file that would be much easier to edit for removing sensitive information before posting.

2 Answers 2

7

I'm not sure how outputting to a text file, opening the text file, and copying from it is easier for the user than just running the command and copying straight out of the terminal. They can edit the output right in the question textarea

3

Seems like writing a reference question & answer on easy ways to get the output from a command onto the web could help with this. I'd guess it'd need to cover, at minimum:

  • script
  • copy & paste from a X11 terminal emulator.
  • basic shell command grouping, redirects, & piping (e.g., { a; b; } > outfile 2>&1)
  • cell phone (etc.) camera

Additional nice topics would be:

  • webboard / pastebinit
  • xclip
  • shutter/etc (screenshot programs).
  • using LC_* to force English
  • serial console, net console (for kernel panics)

I'd write it up myself, but I don't have time at the moment. Maybe later this week...

2
  • 1
    I also thought about pastebinit, but since I geared the topic towards newer users, I felt mentioning it be meaningless. However, I like your idea of a more general solution that adds these topics. I will be happy to help you write it. It's also possible to create short standard gists for this purpose as well. The goal is to keep the more experienced people who desire to help from pulling their hair out when trying to read some of these posts, hopefully providing for a better experience overall.
    – umeboshi
    Jan 16, 2013 at 17:02
  • Just apply Barriga's (for a student of mine) dictum: "Put out anything whipped up, if it is important enough, somebody will be pissed off enough to fix it". Kind of how open source works. This is a collaborative site, after all...
    – vonbrand
    Feb 13, 2013 at 4:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .