Tip #701 Stream YouTube videos directly to your media player
YouTube is great, but the embedded flash player doesn't offer a lot in the way of customizing your viewing experience. There are quite a few options for downloading flv video files from YouTube, but adding the following function to your bashrc will let you stream them directly to your choice of media player.Read more »
Tip #572 Print until no match
This bit of sed will print the contents of a file until the first line which doesn't contain the specified expression. A useful alternative to 'head' when you're not sure how much of the file you need.Read more »
- TAGS:
- sed
Tip #540 Command examples from shell-fu
The following isn't particularly pretty and should be considered a work in progress, but it's quite fun.Get examples of ways a command can be used direct from shell-fu by adding the following alias:
Read more »
Tip #539 Using sed across multiple lines
Sometimes when using sed you find that you need to match across line endings, this can be achieved by getting sed to match the first line and then pulling a second line into the buffer with the N command.For example, if we have a file: Read more »
- TAGS:
- sed
Tip #487 Print part of a file
Print the contents of a file from a given regular expression to anotherRead more »
- TAGS:
- sed
Tip #384 BBC Weather
Go to [http://www.bbc.co.uk/cgi-perl/weather/search/new_search.pl] and search for your location. Copy the link to the 3 day forecast feed, for example [http://feeds.bbc.co.uk/weather/feeds/rss/5day/world/0105.xml]. Then just put that link into the following command to get a quick command line weather forecast.Read more »
Tip #300 Find and replace on specific files
Selective content replace on files. For example to replace '<?' with '<?php' in all PHP files:Read more »
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs