Linux sort by column and in reverse order – CentOS
I'm trying to sort a file by second column, but in reverse order. I tried: sort -k2n -r file.txt The output is not in reverse order, so it seems -r is being ignored. I'm in CentOS.
I'm trying to sort a file by second column, but in reverse order. I tried: sort -k2n -r file.txt The output is not in reverse order, so it seems -r is being ignored. I'm in CentOS.
Folder structure: #root |- deployment | |- start-dev.sh | |- docker-compose.yml | |- // other files including app.Dockerfile and anything else I need |- // everything else Initial start-dev.sh #!/bin/sh docker-compose -p my-container up -d docker-compose -p my-container exec app…
I am working on a new project where I need to connect to a docker container from web? By connect I mean I will create a shell in the website and tat shell will be able to connect to the…
I am using following command to fetch all release tags from mysql on docker hub : wget -q https://registry.hub.docker.com/v1/repositories/mysql/tags -O - | jq -r .[].name Output is: 5.7.38 5.7.38-debian 5.7.38-oracle 5.7.4 5.7.4-m14 5.7.5 5.7.5-m15 5.7.6 5.7.6-m16 5.7.7 5.7.7-rc 5.7.8 5.7.8-rc…
I want to get the Last date of the previous month and the code I'm using is date -d "$(2022-04-30 +%Y%m01) -1 month" +%Y-%m-%d. The output I'm getting is 2022-04-24 instead of 2022-03-31. I'm using Debian Linux.
firstly I had very simple script like this #!/bin/sh if cat /etc/redhat-release | grep -q 'AlmaLinux'; then echo "your system is supported" MY SCRIPT HERE else echo "Unsupported OS" exit0; fi and it works but I want to add another…
I have a container with node:18-alpine3.14 as base image. I have docker-compose file with command: ["prepare_config.sh","--","npm", "run", "start-p"] in prepare config #!/bin/bash json_data=$(cat <<EOF { "url": "$URL" } EOF ) echo "$json_data"; When I try to run this code I…
I've pod with two containers, one is creating a file and one delete it, I was able to create the file but not to delete it. I want it to delete the files every 2 hours, how can I make…
I've had a docker based environment running for a few months, configured via docker-compose and have tried to add new Radarr/Tdarr containers to the configuration. When re-running the docker-compose command, it returns a Permission Denied error as follows: dhevans@ubuntu:/htpc-svc$ sudo…
I'm trying to source .bashrc but no luck USER user SHELL ["/bin/bash", "-c"] RUN echo "export TEST_VAR=test" >> /home/user/.bashrc && tail /home/user/.bashrc && source /home/user/.bashrc && echo "1 "${TEST_VAR} 2" var" && exit 1 I expect that this RUN command…