Hi, I am having trouble trying to get my intended results from this code:
Code:
torrentlink=($(sed -rn "/target=/s/.*href=\"([^\"]+)\".*>.*\.${vars[1]}\.torrent.*/\1/p" "$html"))
torrentlink=($(sed -rn "/target=/s/.*href=\"([^\"]+)\".*>.*
\.${vars[1]}
\.torrent.*/\1/p" "$html"))
I believe I am not correct in trying to escape the single quote, but there is an array defined term in the variable, so this makes the coding even more difficult.
Another question that I have is whether the . for file extension needed backslash to escape, because they seem to be working fine with or without backslashes.
THanks,
Ted