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

Allow Pipes, redirects to be called directly in bash #3

Open
danbryan opened this issue Sep 8, 2018 · 0 comments
Open

Allow Pipes, redirects to be called directly in bash #3

danbryan opened this issue Sep 8, 2018 · 0 comments

Comments

@danbryan
Copy link
Contributor

danbryan commented Sep 8, 2018

Sometime complicated commands can fail such as:

mac -p 'prod' 'aws ec2 describe-instances | jq -r .[][].Instances[] | jq -r .InstanceId'

I believe this has something to do with the way redirection / pipes work. These complicated commands seem to work when mac is called from powershell, but not bash. This can be worked around by create a shell script with the complicated command, then calling the shell script.

EG:

cat <<EOF > runme.sh
#!/bin/bash
aws ec2 describe-instances | jq -r .[][].Instances[] | jq -r .InstanceId
EOF
mac -p 'bryanlabs' './runme.sh'

Determine if there is a way to modify mac.go to allow for these complicated commands to be directly called.

@danbryan danbryan changed the title Allow Pipes, redirects to be called directly Allow Pipes, redirects to be called directly in bash Sep 8, 2018
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

1 participant