DONE allow reference to file type results

  • State "DONE" from "TODO" 2010-02-09 Tue 20:29

So files can be referenced by source code blocks

  • Here's a simple example counting the size of the user's .profile file.

The raw org-mode text

#+results: my-profile
[[file:~/.profile][my-profile]]

#+begin_src sh :var profile=my-profile
  wc $profile
#+end_src

#+results:
: 22 109 675 /home/eschulte/.profile

Now exported to html

my-profile

wc $profile
  • Or perhaps a slightly fancier example using the host command to grab IP information for the org-mode homepage.

The raw org-mode text

#+results: org-mode-page
[[http://orgmode.org/][org-mode-page]]

#+begin_src sh :var page=org-mode-page
  host $page |head -1
#+end_src

#+results:
: http://orgmode.org/ has address 63.123.155.104

or exported to html

org-mode-page

host $page |head -1