I have a code block with a shell scripts that asks for a token. I want to insert this token into the header-args, so that I can reference this from other code blocks.
I usually copy it, but can this be done with code?;)
Something like this:
#+name: generate
#+begin_src shell
#generate-token
echo "Super-secret-token-ABC"
#+end_src
#+name: use-token
#+begin_src shell :var token=generate
echo command-that-needs-to-authenticate --token=${token}
#+end_src
#+RESULTS: use-token
: command-that-needs-to-authenticate --token=Super-secret-token-ABC
:var token=foo
where foo is the name of the code block that produces the token.