Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace 'sh' for 'bash' in docker container #20

Closed
c-nv-s opened this issue Sep 6, 2022 · 3 comments
Closed

replace 'sh' for 'bash' in docker container #20

c-nv-s opened this issue Sep 6, 2022 · 3 comments

Comments

@c-nv-s
Copy link

c-nv-s commented Sep 6, 2022

In trying to avoid creating temporary files to store data which could just be kept in variables it is possible in bash to use the following syntax of process substitution and input redirection in order to pass data onto other commands:

{ read -d '' result ; }< <( curl http://myjsonapi.com/page1 | jq '.[0].somedatapoint' ) && anothercommand <<< "$result"

unfortunately this syntax isn't supported in 'sh' and an unexpected redirect error is received.
Is it possible to use bash in the docker containers instead.

reddec added a commit that referenced this issue Jan 1, 2023
@reddec
Copy link
Owner

reddec commented Jan 1, 2023

Could you please elaborate?

I suppose you can just use #!/usr/bin/env bash. I also added bash to the full image

@reddec
Copy link
Owner

reddec commented Jan 1, 2023

I am closing the issue for now. Feel free to re-open it.

@reddec reddec closed this as completed Jan 1, 2023
@c-nv-s
Copy link
Author

c-nv-s commented Jan 1, 2023

thanks for this, and thanks again for the very useful project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants