Fork me on GitHub
#planck
<
2017-08-11
>
tap04:08:16

A beginner question: How do I use pipe or stdin with planck.shell/sh? For example, how do I run a shell command which equals to this?

$ psql dbname < sql-file-name.sql
or
$ cat sql-file-name.sql | psql dbname

mfikes05:08:11

@tap (shell/sh "sh" "-c" "some command string with pipes")

mfikes05:08:41

@tap reading lines from *in* is discussed here http://planck-repl.org/scripts.html

tap05:08:31

That solves my issue. Thank you so much, Mike.