This feed contains pages tagged "shell".
To fetch the link for old harry's game:
$ wget -q -O - http://www.bbc.co.uk/iplayer/console/b007jpd8 | \
link.pl | grep ".ram$" | head -1
To fetch from the link in the clipboard, and place the answer in the clipboard:
$ wget -q -O - $(xclip -o) | link.pl | grep ".ram$" | head -1 | xclip -i
Replacing link.pl and the grep with sed:
$ wget -q -O - $URL | sed -e '/http/!d' -e 's/.*http:\/\/\([^ \"]*\).*/\1/g' -e '/.ram$/!d' | head -1
See also bbcplay.
Attachments:
- ?link.pl
The output of /sbin/route contains the default network interface:
route | grep "^default" | awk '{print $8}'
Attachments:
Rather than using cut and grep (to find files present locally, but not checked in):
svk status | grep "^\?" | cut -d " " -f 2
You can use awk:
svk status | awk '/^\?/ {print $2;}'
Or sed:
svk status | sed -e '/^?/!d' -e 's/^?\s*//'
Or, just for fun, perl:
svk status | perl -ne 'print $1."\n" if /^\?\s*(.*)/'
Have a look in the RSS feed from the BBC weather centre:
wget -q -O - http://feeds.bbc.co.uk/weather/feeds/rss/5day/id/1671.xml \
| sed -e '/Sunset/!d'|sed -e 's/^.*Sunset: \(.*\)GMT.*$/\1/' | head -1
Replace 1671.xml with whereever you are.