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 votes

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
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,367 views 9 12
Read article

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