* preserve trailing zeros in table output from shell script
@ 2012-07-14 12:35 Joseph A. Cua
2012-07-15 9:16 ` suvayu ali
2012-07-15 14:08 ` Eric Schulte
0 siblings, 2 replies; 3+ messages in thread
From: Joseph A. Cua @ 2012-07-14 12:35 UTC (permalink / raw)
To: emacs-orgmode
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?
Thanks,
Joe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: preserve trailing zeros in table output from shell script
2012-07-14 12:35 preserve trailing zeros in table output from shell script Joseph A. Cua
@ 2012-07-15 9:16 ` suvayu ali
2012-07-15 14:08 ` Eric Schulte
1 sibling, 0 replies; 3+ messages in thread
From: suvayu ali @ 2012-07-15 9:16 UTC (permalink / raw)
To: Joseph A. Cua; +Cc: emacs-orgmode
On Sat, Jul 14, 2012 at 2:35 PM, Joseph A. Cua <jac89@cornell.edu> wrote:
> 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?
>
Some examples would help.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: preserve trailing zeros in table output from shell script
2012-07-14 12:35 preserve trailing zeros in table output from shell script Joseph A. Cua
2012-07-15 9:16 ` suvayu ali
@ 2012-07-15 14:08 ` Eric Schulte
1 sibling, 0 replies; 3+ messages in thread
From: Eric Schulte @ 2012-07-15 14:08 UTC (permalink / raw)
To: Joseph A. Cua; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
"Joseph A. Cua" <jac89@cornell.edu> 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,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: results-org.org --]
[-- Type: text/x-org, Size: 125 bytes --]
#+begin_src sh :results output org :exports results
cat <<EOF
| 1.0000 | 22.000 |
| 333.00 | 4444.0 |
EOF
#+end_src
[-- Attachment #3: Type: text/plain, Size: 53 bytes --]
Best,
--
Eric Schulte
http://cs.unm.edu/~eschulte
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-15 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-14 12:35 preserve trailing zeros in table output from shell script Joseph A. Cua
2012-07-15 9:16 ` suvayu ali
2012-07-15 14:08 ` Eric Schulte
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).