Question: I have purchased Logitech MX Keys keyboard, it works well both on Linux, Windows and Mac but there is one problem. I have a multiple operating systems installed on my computer and when I boot up my computer I am prompted with a Bootloader that asks me to select an operating system to boot. Before I power up my compuer I connect my keyboard with a USB cable but the keyboard does not work. Obviously, I can't access BIOS as well, even though my keyboard is connected with a USB cable. I have another keyboard Apple Magic keyboard, which has a USB as well and when I connect it it works fine in bootloader and BIOS. It is weird that the USB is meant only to charge the keyboard and cannot be used to actually type on the keyboard. Is this expected?

Answer: 
It's not curl that decides case-insensitivity at all – link "checking" is the *server's* decision.

(In other words, HTTP clients do not have the opportunity to see the list of all possible URLs and choose a matching one. The *only* thing an HTTP client can do is give the exact URL to the server and let the server decide how to respond. Some servers are case-insensitive, some are not.)

But if you already know that you need a lowercase 'linux', you can just transform the `uname` output **before** giving it to curl, e.g. by piping it through `tr A-Z a-z` to change all uppercase letters to lowercase:

```
docker-$(uname -s | tr A-Z a-z)

```

or by using Bash's `${var,,}` expansion to return a lowercase version of `$var`:

```
os=$(uname -s); arch=$(uname -m)

docker-${os,,}-${arch}

```

Finally, since there's only a small set of accepted values, and because the accepted values aren't guaranteed to be "uname but lowercase" in general, you could indirectly assign each possible value (using `if` or `case` blocks), for example:

```
case $(uname -s) in
    Darwin)    docker_os='darwin';;
    Linux)     docker_os='linux';;
    Cygwin)    docker_os='windows';;
    Microsoft) docker_os='windows';;
    *)         echo "Docker is not supported on this OS!" >&2; exit 1;;
esac

```

(Note: The 'windows' examples are completely made up. )
[Case sensitivity for the part after the domain names is up to the server](https://stackoverflow.com/a/17113291/10765659).

To fully emulate case-insensitivity of the server, `curl` would have to try up to all possible combinations (`…LiNUx…`, `…linUX…`) and there's an enormous number of them.

If you *know* the server uses all-lowercase strings then a reasonable thing to do is to convert the URL to lowercase before supplying to `curl`. Example for Bash:

```bash
url="https://github.com/docker/compose/releases/download/2.9.0/docker-compose-$(uname -s)-$(uname -m)"
url="${url,,}"
curl -L "$url" -o here

```

**BUT the right URL is with `v2.9.0` and the server in question is actually *case-insensitive* for the `docker-compose-…` component. The simplest fix for you is just to add the missing `v`:**

```
curl -L "https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m)" -o here
#                                           this was missing ^

```

Without this `v` no conversion can help.