emacs-orgmode
[Top][All Lists]
Advanced

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

[O] set :var to string inline code


From: Charles Millar
Subject: [O] set :var to string inline code
Date: Sat, 1 Dec 2018 17:53:41 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

Hi,

I have recutils data base and from that I want to use inline source code to generate a list of names, addresses, etc. for instance the following inline code when exported in latex


src_sh[:results raw :results replace :exports results :eval yes]{recsel -t InterestedParties -e "IPName='Charles Millar'" -P IPPrintName Millar.rec}
src_sh[:results raw :results replace :exports results :eval yes]{recsel -t InterestedParties -e "IPName='Charles Millar'" -P IPAddress1 Millar.rec}
src_sh[:results raw :results replace :exports results :eval yes]{recsel -t InterestedParties -e "IPName='Charles Millar'" -P IPPAddress2 Millar.rec}

will give

Charles Millar
123 XYZ Street
Apt 678

However, there are (as there should be) many records in the database and rather than set each and every IPName= to a specific field I want to use something like the following

#+name: iponeshell
#+begin_src sh :results raw :exports results
iponeassign="Charles Millar"
echo "$iponeassign"
#+end_src

#+RESULTS: iponeshell
Charles Millar

src_sh[:results raw :results replace :var IPOne='iponeshell' :eval yes]{recsel -t InterestedParties -e "IPName=IPOne" -P IPPrintName Millar.rec}
src_sh[:results raw :results replace :var IPOne='iponeshell' :eval yes]{recsel -t InterestedParties -e "IPName=IPOne" -P IPAddress1 Millar.rec}
src_sh[:results raw :results replace :var IPOne='iponeshell' :eval yes]{recsel -t InterestedParties -e "IPName=IPOne" -P IPAddress2 Millar.rec} 

The above example evaluates, but there is no output. I have tried :exports results as well as diggernet variations of dounle and sing quotes, at both where I define var and at the _expression_ selection within recsel.

I believe that this is bash issue so I have also tries to use $ with the :var and recsel selection _expression_.

Any help would be gretly appreciated.

Charlie Millar


src_sh[:results raw :results replace :var IPOne=iponeshell :exports results :eval yes]{recsel -t InterestedParties -e "IPName='Charles Millar'" -P IPPrintName StreichertCatherine.rec}

I am


reply via email to

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