Skip to content

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

@danbryan

Description

@danbryan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions