‘Script of the day’ Archive

Audible “Command done” notifiction on the shell 2014-07-13 2 Comments

Background story / context At work I’m dealing with a test suite running >30 minutes, even on moderately fast hardware. When testing some changes, I launch the test suite and start working on something else to not be waiting for the test suite. Now the sooner I know that the test suite finished execution, the […]

Work around overheating with cpufreq-set 2012-06-07 2 Comments

One of my Gentoo boxes has overheating issues which I have yet to properly address on hardware level. Compiling something like Boost or Firefox results in a guaranteed emergency reboot, literally not cool. The box has a dual core CPU with 2.53 GHz. Fortunately, it can be throttled to do operate at a lower frequency […]

Playing around with awk 2009-01-25 No Comments

My first little awk script for fun: linenumbers #!/usr/bin/awk -f # # Copyright (C) 2009 Sebastian Pipping # Released under GPLv3 # # # Usage: #   ./linenumbers <file1> <file2> … # or #   … | ./linenumbers # BEGIN {     firstFile = 1     fileName = “-” } {     if (fileName != FILENAME) {         fileName = FILENAME […]

Splitting Apache access logs and feeding the result to Geolizer 2007-12-31 No Comments

I feel like sharing a script of mine. A script I wrote to split log files holding data of several sub domains into single files, and generate a separate report for each sub domain out of that. The script is used on a DomainFactory host so if you have an account at DomainFactory this might […]

Script of the day: “Making all folders below $(pwd) listable” 2007-12-18 No Comments

Recursive chmod is no option here. I did that once by mistake… find . -type d -exec chmod a+x ‘{}’ \;

How to extract audio from FLV files using VLC 2007-07-11 41 Comments

It took my some time to get it working but in the end VLC did exactly what I wanted: produce a seekable no-video MP3 file from the audio of a Flash Video File. Here is how it’s done: vlc.exe “source with spaces.flv” ––sout     #transcode{acodec=mp3}     :duplicate{dst=std{access=file,mux=raw,     dst=\””dest with spaces.mp3″\”},select=\”novideo\”} This is one single line, remove the […]

Script of the day: “Native eol-style for all” 2007-07-03 No Comments

Once again I needed to batch set svn:eol-style to native for a whole checkout. It’s a basic script, I just feel like sharing it… #! /bin/sh for i in `find . -name ‘*.cpp’ \     -or -name ‘*.c’ -or -name ‘*.h’` do     unix2dos $i     svn propset svn:eol-style native $i done