fork download
  1. #!/bin/bash
  2. s='<a href="url with spaces">description with spaces</a>'
  3. sed -Ee 's`.*href="(.*)">(.*)</a>.*`"\1","\2"`' <<< "$s"
  4. awk -F'href="|">|</a>' '{gsub(/ /, "%20",$2);print "\""$2"\",\""$3"\""}' <<< "$s"
Success #stdin #stdout 0s 4580KB
stdin
Standard input is empty
stdout
"url with spaces","description with spaces"
"url%20with%20spaces","description with spaces"