Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
#!/bin/bash # # @param $1 # the XXX number as shown on 'onclick=VideoImgOn('http://...MediaID=XXX&CategoryId...') # @param $2 # The same for CategoryID URL1="http://www.keshet-tv.com/Common/ClickPlay.aspx?MediaID=${1}&CategoryID=${2}" URL2=`wget -O - ${URL1} | awk -F\" 'BEGIN {c=0} /Ref/ {c++; if (c==2) print $2;}'` TEMP=`tempfile` wget -O $TEMP ${URL2} URL3=`awk -F\" '/^<ref/ {print $2;}' $TEMP | head -1` rm $TEMP echo "Playing Cat $2, Media $1" mplayer -cache 4096 -fs -really-quiet ${URL3}
This paste will be private.
From the Design Piracy series on my blog: