emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] preserve trailing zeros in table output from shell script


From: Eric Schulte
Subject: Re: [O] preserve trailing zeros in table output from shell script
Date: Sun, 15 Jul 2012 08:08:43 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

"Joseph A. Cua" <address@hidden> writes:

> I have a reporting shell script that generates a tab-delimited table.
> Using it within a shell code block, org parses this nicely into an org
> table. But org seems to drop any trailing zeros from numeric cells. My
> reporting script has already done the number formatting, so I want
> trailing zeros preserved (both within org and in html export). What's
> the best way?
>

If you want to return the numbers as strings *and* you want the results
to be captured as an Org-mode table, then you should use the ":results
org" output type so that you have complete control over the table.

For example,

#+begin_src sh :results output org :exports results
  cat <<EOF
  | 1.0000 | 22.000 |
  | 333.00 | 4444.0 |
  EOF
#+end_src
Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

reply via email to

[Prev in Thread] Current Thread [Next in Thread]