title: Extract filename and path from URL in bash script
body: <p>In my bash script I need to extract just the path from the given URL.
  For example, from the variable containing string:</p>
  
  <p><a href="http://login:password@example.com/one/more/dir/file.exe?a=sth&amp;b=sth" rel="noreferrer">http://login:password@example.com/one/more/dir/file.exe?a=sth&amp;b=sth</a></p>
  
  <p>I want to extract to some other variable only the:</p>
  
  <p>/one/more/dir/file.exe</p>
  
  <p>part. Of course login, password, filename and parameters are optional.</p>
  
  <p>Since I am new to sed and awk I ask you for help. Please, advice me how to do it. Thank you!</p>