I've coded a small script in bash, which reads some HTML and should print href of a link : var source My example is: Problem: do not print the script Prints instead How can I save this line from breaking? You To escape from, it works for me: Echo the output #! / Bin / bash link = $ (echo $ source | sed -ne's # ^. * & Lt; a href = "[[^"] * \) ". * $ # 1 #p ') If [" $ (Resonant "$ link" | grep '/ fonts / list / style') "] Then" http: //www.domain.com$link/10000 "" / Pre>
& lt; Li & gt; & Lt; Span & gt; 19 & lt; / Span & gt; & Lt; A href = "/ fonts / list / style / home word" & gt; Link text & lt; / A & gt; & Lt; / Li & gt;
http: //www.domain .com / fonts / list / style / home words / 1000
http://www.domain.com/fonts/list / style / home word / 1000
" to
#! / Bin / bash s ICEEELA; Li .a.tk 19
http://www.domain.com/fonts/list/style/home The word / 10000
No comments:
Post a Comment