I am trying to cut ABCservice
and DEFService
dfrom the array and print them.What am I missing here?
urlArray=('http://server:port/ABCservice/services/ABCservice?wsdl' 'http://server:port/DEFservice/services/DEFservice?wsdl')
for url in "${urlArray[@]}"
do
service=echo $url|cut -f4 -d/
echo $service
done
Expected Output:
ABCService
DEFService
Current Output:
./test1.sh: line 6: http://server:port/ABCservice/services/ABCservice?wsdl: No such file or directory
./test1.sh: line 6: http://server:port/DEFservice/services/DEFservice?wsdl: No such file or directory