Welcome ;
i got a text file contain images urls like
PHP Code:
<img id="thumb-m6qsZ" class="thumb-title" title="" alt="" data-src="http://domain.com/m6qsZs.jpg" data-index="0" />
<img id="thumb-KwvJK" class="thumb-title" title="" alt="" data-src="http://domain.com/KwvJKs.jpg" data-index="1" />
how can i get the urls that's start with
http:// and ends with
.jpg and save them in another text file which will be every url in a new line . Like this :
Code:
http://domain.com/m6qsZs.jpg
http://domain.com/KwvJKs.jpg
i tried : grep -i "/http.[^"]*\.jpg/" i.txt > o.txt
but see what i get :
user@user ~
$ grep -i "/http.[^"]*\.jpg/" "i.txt" > "o.txt"
> #when i press enter i get a new line says " > " again
>
>
> " #when i put " i get
grep: Unmatched [ or [^
how can i do it ?