Bash and variables


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
8 views
Hello gentlemen, need a little help. Write a fairly simple script and stuck a bit with the data from the variable. If the data is specified directly in the script:
...
url=$(wget-qO - $rss | grep -ioe 'http.*torrent' | grep -ie '[0-9]\\{4\\}/\\(Survivors\\|The.Event\\)' | grep -v '720p\\|HD')
echo $url
...

everything is fine, I echo outputs something like
lostfilm.tv/download.php/2739/Survivors.S02E03.rus.Lostfilm.TV.avi.torrent

but if I create a variable
shows="(Survivors\\|The.Event\\)"
and write
...
url=$(wget-qO - $rss | grep -ioe 'http.*torrent' | grep -ie '[0-9]\\{4\\}/\\"$shows"' | grep -v '720p\\|HD')
echo $url
...

I script nothing displays and I understand that wget just doesn't work. errors with no no. prompt in what side to dig?
by | 8 views

3 Answers

0 like 0 dislike
url=$(wget-qO — $rss | grep -ioe 'http.*torrent' | grep -ie '[0-9]\\{4\\}/\\'$shows | grep -v '720p\\|HD')
by
0 like 0 dislike
Unfortunately can't check for sure, but try to put quotes ` instead of ""and in some places' '. Now I can not precisely tell, sorry.
by
0 like 0 dislike
shows="(Survivors\\|The.Event\\)"
the trailing slash on the end of the move, she's extra turns
by

Related questions

0 like 0 dislike
1 answer
asked Mar 24, 2019 by KriegeR
0 like 0 dislike
2 answers
0 like 0 dislike
6 answers
asked Mar 23, 2019 by gnusy
0 like 0 dislike
7 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
27,967 users