E
E
Evgeny Elizarov2010-12-22 13:17:22
PowerShell
Evgeny Elizarov, 2010-12-22 13:17:22

Bash and variables

Hello gentlemen, I need a little help. I am writing a fairly simple script and got stuck a bit with data from a variable. If the data is specified directly in the script: everything is fine, echo perfectly displays 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 I'm already writing the script to me, it doesn't output anything, and as I understand it, wget simply doesn't work. there are no errors whatsoever. tell me pliz in which direction to dig?
...
url=$(wget -qO - $rss | grep -ioe 'http.*torrent' | grep -ie '[0-9]\{4\}/\(Survivors\|The.Event\)' | grep -v '720p\|HD')
echo $url
...



...
url=$(wget -qO - $rss | grep -ioe 'http.*torrent' | grep -ie '[0-9]\{4\}/\"$shows"' | grep -v '720p\|HD')
echo $url
...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
fozzy, 2010-12-22
@KorP

url=$(wget -qO - $rss | grep -ioe 'http.*torrent' | grep -ie '[0-9]\{4\}/\'$shows | grep -v '720p\|HD' )

K
kurd, 2010-12-22
@kurd

Unfortunately I can't check for sure right now, but try putting `` instead of " " and in some places ' '. I can't be more specific right now, sorry.

D
digreen, 2010-12-22
@digreen

shows="(Survivors\|The.Event\)"
remove the slash at the end, it turns out superfluous

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question