awk in pipeline script works differently from local version Edited

I use awk command  to parse pid of my server process. So i have next command with its output:изображение.png

But it does not work. To know reasons of it i gизображение.pngo step back:изображение.pngизображение.png

Here we can see, that awk statement have no affect result.

At the same time, exactly this command  on server  works properly.

изображение.pngSo how cann i solve this issue? What i am doing wrong?

1 answer

0 vote

Can you double check the output of "ps aux | grep '/[r]ace_bot/' | awk '{print$2}'" on Pipelines? You've got everything else to compare except that at the moment.

Also you may wanna check that your PIDs are still output as expected if you use:

ps aux | grep '/[r]ace_bot/' | awk '{print $2}' | xargs echo

Sorry for this, first version screen have not been published(

I edited question.

Here is that screen, and i don't know, why it is not workingизображение.png

Hmmm. Nothing stands out as suspicious. Is the issue reproduced if you run this inside of a Docker environment? Pipelines runs in Docker, so it should be an identical environment here.

Actually. The 'print $2' doesn't seem to be working as expected here. That seems like a candidate.

What Docker image are you using in Pipelines?

As I understand what image docker, I use


 At the same time, at the first command in my scipt i connect to my remote server and then all commands execute on server side.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

30,654 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you