I have the below url and trying to delete few string value and return the value in variable.
Input:
https://ciapi-pilot22.us-central1.gcp.amazon.com/test-ci-1877/view/test/job/newFiJob
Expected output:
/test-ci-1877/view/test/job/newFiJob
I tried the below command to eliminate the values and return the value into variable:
test=$(echo "$resultTotalUrl" | sed 's/^https://ciapi-pilot22.us-central1.gcp.amazon.com/')
echo $test
But it's failing.