Skip to content
Advertisement

Tag: devops

Bash select multiple values in CSV column

I have the following CSV format: “/opt=920MB;4512;4917;0;4855″,”/=4244MB;5723;6041;0;6359″,”/tmp=408MB;998;1053;0;1109″,”/var=789MB;1673;1766;0;1859″,”/boot=53MB;656;692;0;729” I would like to extract 2 values from each column, the first and the last value from the array, after the “=”, like this: “/opt=920MB;4855″,”/=4244MB;6359″,”/tmp=408MB;1109″,”/var=789MB;1859″,”/boot=53MB;729” Per column it can work like this: Any hints are highly appreciated. Answer Found the solution by using sed: echo “$string”| sed ‘s/=*;[^”]*;/,/g’

Different file owner inside Docker container and in host machine

I am facing a issue related to Docker users. I run my container as gitlab-runner using the following command: The files created inside the docker container show owner gitlab-runner, however, the same files show in my host machine as owner roggerfernandes. gitlab-runner must be the owner of files created inside Docker container as well as host machine. Answer Filesystems, at

Track down high CPU load average

Trying to understand what’s going on with my server. It’s a 2 cpu server, so: While on load avergae, queue is showing ~8 : So You can assume, load is really high and things are pailing up, there is some load on the system and it’s not just a spike. However, Looking at top cpu consumers: Results of free command:

Advertisement