babashka 2026-02-09

if i want to put all my scripts under '.scripts' and want to run them with the tasks in bb.edn how can i refer to scripts?

oh no everything fine 😄 i'm just stupid -.- :paths not :path

2
❤️ 1

but one more thing when i'm using something like echo "hello world" > test how could i do that cause now this line doesn't produce the output i want

(shell {:dir project-dir :out :string :err :string} cmd)

do you want to redirect to a file?

:out (io/file ...)

but it has to be dynamic cause i'm building some sort of task runner 😕

or :out-file (double check with docs, not sure)

so the input file contains commands that should be executed and i just want to reply back what the out and in was or do i have to use process therefore

can you state once again the full requirements? not sure if I understand completely

requirements what a harsh word 😄. So my idea is to create a tool where i create a yaml file like

script: |
  echo "Hello World" > bla
  cat bla
and that should be read by babashka and print out every outcome of the command

the issue is that you want to execute this through bash since > is a bash construct. so you need to do something like:

(shell ... "bash" "-c" your-line-here)

yeah i've done it now diffrently 😄 i just write the script to a file and execute that 😄

that sounds unnecessarily complicated

❤️ 1

nice that works