Check These Out
shows some logging for the git repo.
Use this if you don't have access to GNU grep's -B option.
Assuming you are working within a git repository, you can run the above command & see what has changed in reverse chronological order, with one commit per line. Other formatting variations to 'oneline' include 'short', 'medium', 'full', 'fuller', 'email' or 'raw'.
This command copies all filenames in the current dir and subdirs that end in .mp3 regardless of case (also matches .MP3 .mP3 and .Mp3)
It copies all the files to the "mp3" folder in your home directory.
If you want to see the files that are beeing copied, replace "cp {}" with "cp -v {}"
This saves Subversion's log output as XML and then runs an XQuery over it. This is standard XQuery 1.0 and should therefore also work with other XQuery processors. I have tested it with Zorba (http://www.zorba-xquery.com). XQilla (http://xqilla.sourceforge.net) also does it, but you'd have to save the query to a file and then execute "xqilla filename.xq".
The query first finds all distinct authors and then, for each author, sums up the number of paths they have changed in each commit. This accounts for commits of multiple changes at once.
The indenting space in all lines from the second one seems to be due to a bug in Zorba.
Place in ~/.bashrc
If you login to a ssh server from different ips, sometimes you want to do something specific for each.
e.g., quickly go into screen -x session from a phone, but not your desktop.
This command could seem pretty pointless especially when you can get the same result more easily using the rpm builtin queryformat, like:
$ rpm -qa --qf "%{NAME} %{VERSION} %{RELEASE}.%{ARCH}\n" | sort | column -t
but nonetheless I've learned that sometimes it can be quite interesting trying to explore alternative ways to accomplish the same task (as Perl folks like to say: There's more than one way to do it!)