The command runs on your agent, with the tools (bash, grep etc) available
to your specific agent type and its OS.

You might want to first check if it runs as you'd expect on the specific
agent type directly (via ssh or docker run or similar).

If it works when run directly, perhaps the issue is with the input to the
shell executor and your GoCD configuration.

If you still can't get it to work, you might want to think about source
controlling the script for easier maintenance.

-Chad

On Wed, 30 Nov 2022, 15:12 priya shetty, <[email protected]> wrote:

> Hello,
>
> Cannot we use the grep -ivr command in the gocd pipeline script executor
> plugin?
>
> I am using the following aws cli command with the grep command and unable
> to use it.
>
> aws iam list-policies | jq '.Policies[]   | .Arn' | grep -ivr "test" | cut
> -d '"' -f 2  > test.csv
>
> Instead of filtering the aws cli output , it writes the complete git log
> to the csv file
>
> Is there any restriction on using the grep command in the Gocd shell
> script executor plugin ?
>
> Thanks
> Regards
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/1b9bf2ba-5bb9-4ac0-ad6d-df35051b120bn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/1b9bf2ba-5bb9-4ac0-ad6d-df35051b120bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAA1RwH8%3DCwGz9tfP%3DffrvOyfNxpwLQpxUJwC%2BzUjr26mqrWipQ%40mail.gmail.com.

Reply via email to