When I run the following command in a bash script:
urlOfServer="$($repoURL_StripLastFour | awk -F'/' '{print $1}')"
I get the following error:
192.168.1.12:7999/pcfpt/scriptsforexamples: No such file or directory
You can see that the value of the repoURL_StripLastFour
variable is 192.168.1.12:7999/pcfpt/scriptsforexamples
at the time when the script is run. This value is auto-created at runtime by other elements of the script, so I cannot simply pass it as a literal.
What specific syntax is required to resolve this error, so that the urlOfServer
variable can be successfully populated?
I have tried many variations of moving quotes and parentheses already.