Check These Out
For instance:
$ find . -type f -name '*.wav' -print0 |xargs -0 -P 3 -n 1 flac -V8
will encode all .wav files into FLAC in parallel.
Explanation of xargs flags:
-P [max-procs]: Max number of invocations to run at once. Set to 0 to run all at once [potentially dangerous re: excessive RAM usage].
-n [max-args]: Max number of arguments from the list to send to each invocation.
-0: Stdin is a null-terminated list.
I use xargs to build parallel-processing frameworks into my scripts like the one here: http://pastebin.com/1GvcifYa
This assumes that there is a 10.2 sec delay between the video and the audio (delayed).
To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie
Print a git log (in reverse order) giving a reference relative to HEAD.
HEAD (the current revision) can also be referred to as HEAD~0
The previous revision is HEAD~1 then HEAD~2 etc.
.
Add line numbers to the git output, starting at zero:
$ ... | nl -v0 | ...
.
Insert the string 'HEAD~' before the number using sed:
$ ... | sed 's/^ \+/&HEAD~/'
.
Thanks to bartonski for the idea :-)
Searches all .php files for a static instantiation of a class and displays the class names along with their frequencies.
You can use this to directly dump from machine A (with dvd drive) to machine B (without dvd drive) . I used this to copy dvd using my friend's machine to my netbook. Above command is to be issued on machine B.
Advantages :
1) No wasting time dumping first to machine A and then copying to Machine B.
2) You dont need to use space on Machine A. In fact, this will work even when Machine A doesnt have enough hdd space to dump the DVD.
Use -C ssh option on slow networks (enables compression).
you can replace "dd if=/dev/dvd" with any ripping command as long as it spews the iso to stdout.
This will fetch a metascore from metacritic.com.
It requires a url from metacritic without the http://www.metacritic.com/
Example:
$ metascore games/platforms/wii/supermariogalaxy
-
$ metascore tv/shows/marriageref
-
$ metascore video/titles/newmoon
Would be cool to use this in some sort of a graph.
When you have one of those (log)files that only has epoch for time (since no one will ever look at them as a date) this is a way to get the human readable date/time and do further inspection.
Mostly perl-fu :-/
My PS1
An example of zsh glob qualifiers.