Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to use pipe character in YAML specs?


I have a simple script:

- checkout: SOME / Repo
- script: |
set -ex
echo '{"a":"b"}' | jq -M

But for some reason the last line is failing with the following error:

error 15-Feb-2022 19:29:33 + jq -M error 15-Feb-2022 19:29:33 + echo '{"a":"b"}' error 15-Feb-2022 19:29:33 jq - commandline JSON processor [version 1.5-1-a5b5cbe] error 15-Feb-2022 19:29:33 Usage: jq [options] <jq filter> [file...] error 15-Feb-2022 19:29:33 error 15-Feb-2022 19:29:33 jq is a tool for processing JSON inputs, applying the error 15-Feb-2022 19:29:33 given filter to its JSON text inputs and producing the error 15-Feb-2022 19:29:33 filter's results as JSON on standard output. error 15-Feb-2022 19:29:33 The simplest filter is ., which is the identity filter, error 15-Feb-2022 19:29:33 copying jq's input to its output unmodified (except for error 15-Feb-2022 19:29:33 formatting). error 15-Feb-2022 19:29:33 For more advanced filters see the jq(1) manpage ("man jq") error 15-Feb-2022 19:29:33 and/or error 15-Feb-2022 19:29:33

It seems '|' should be somehow escaped. I tried to use \| but it doesn't work. What I'm doing wrong?

1 answer

1 accepted

2 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 15, 2022 • edited

Hello @denis_kot

jq needs a filter. Try something like this:

echo '{"a":"b"}' | jq -M .


Eduardo Alvarenga
Atlassian Support APAC

Weird, in the console it's working without any filter

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events