#!/bin/bash# Extract the version from the geth command outputGETH_VERSION="v$(geth version | grep'^Version:' | awk'{print $2}')"# Read the version from the .gethrc fileGETHRC_VERSION=$(cat .gethrc)# Check if GETHRC_VERSION contains a '-'. If not, append '-stable'.if[[$GETHRC_VERSION!=*-*]];thenGETHRC_VERSION="${GETHRC_VERSION}-stable"fi# Compare the versionsif[["$GETH_VERSION"=="$GETHRC_VERSION"]];thenecho"Geth version $GETH_VERSION is correct!"exit 0elseecho"Geth version does not match!"echo"geth version: $GETH_VERSION"echo".gethrc version: $GETHRC_VERSION"exit 1fi