Bash spaceship function

in code


I have no idea why this spaceship comparison is important, but a note in the file marked it so, and now here we are.

#!/usr/bin/env zsh

spaceship() {
    if [[ $1 -lt $2 ]]; then
        echo -1
    elif [[ $1 -eq $2 ]]; then
        echo 0
    else
        echo 1
    fi
}

spaceship $1 $2


A Summer of Running

in running

Achill Half Marathon

in running


Your email address will not be published. Required fields are marked *