title: Shell script cut command
body: <p>I am trying to cut <code>ABCservice</code> and <code>DEFService</code> dfrom the array and print them.What am I missing here?</p>
  
  <pre><code>  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
  </code></pre>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>ABCService
  DEFService
  </code></pre>
  
  <p>Current Output:</p>
  
  <pre><code>./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
  </code></pre>