Replies: 1 comment
-
|
Similar to https://bats-core.readthedocs.io/en/stable/gotchas.html#my-piped-command-does-not-work-under-run because of parsing rules, the redirect applies to You could put that into its own function. However, in this simple case I would just omit |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bats file:
Shell lines:
If foo.txt does not exist, it is created. It's as if the stdout from echo is empty. I also tried with cat, again the stdout seems to be empty.
What is going on? :) I'm sure there is a good explanation.
How can I write a text string to a file from within a bats file?
Sincerely
Beta Was this translation helpful? Give feedback.
All reactions