12

I want to know about my networking hardware.

lspci | grep -i net

From the terminal, this command gives the following output:

00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 06) 02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)

But when I try running this from org-mode through a babel source block I get no output.

#+BEGIN_SRC sh
lspci | grep -i net
#+END_SRC

#+RESULTS:

What gives? How can I get the same output I got from the terminal?

Nikana Reklawyks
  • 3,233
  • 3
  • 33
  • 49
wdkrnls
  • 4,548
  • 7
  • 36
  • 64

1 Answers1

15

You do get results, only not handled properly (most likely temporarily displayed in the minibuffer).

Add :results output replace after #+begin_src sh, as a header argument (to override default values), to have the output (re)placed in your org-mode buffer. All its possible values are described here in the Manual.

nephewtom
  • 2,941
  • 3
  • 35
  • 49
Nikana Reklawyks
  • 3,233
  • 3
  • 33
  • 49
  • Adding `:results replace` was the first thing I tried. Unfornately, I didn't see any change in output. Reading [the manual](http://orgmode.org/manual/System_002dwide-header-arguments.html#System_002dwide-header-arguments) I saw that `:results replace` was the default value anyway. – wdkrnls Oct 07 '12 at 20:05
  • 2
    @wdkrnls: try `results: output replace`, and `results: append`, maybe also. Check they're not output elsewhere in the buffer, if you have a `#+name` (by executing in a blank org file). (also the mistake I usually do is to forget the plural to resultS) – Nikana Reklawyks Oct 07 '12 at 20:08