It doesn’t fit all jobs
Reading the referers of this website, I found that someone reached it querying a search engine for using AWK to find zero length files AWK is a great tool but IMHO that is not its job. I would have used a simple find -size 0b
Hash’em all
I’ve just released Hash’em all: a Bash script which substitutes recursively the content of the files of a folder with their own sha1sum (changing it to compute a different chechsum is pretty trivial of course). It is a modified version of the already hacked script written by Kaz Kylheku. As Kaz wrote in 2000: What [...]
Exporting changed only files with Subversion
Reading the referers of this website, I found that someone reached it querying a search engine for subversion or svn export only changed files This one-liner (that can be easily turned into a subversion hook) could do the task for i in `svn log -r HEAD -v | grep “^ [MA]” | awk ‘{print $2}’`; [...]
A Bash-becue recipe :)
Reading the referers of this website, I found that someone reached it querying a search engine for bash scripting validate file extension I suppose they were looking for a script that, for example, when it finds a perl file, it is able to recognise it as such even if its extension is not pl. Well, [...]
You talkin’ to me? :)
Reading the referers of this website, I found that someone reached it querying a search engine for Perassi Bash patch talker I suppose they were trying to reach my old bup patch (it modifies the shell to send all user keystrokes via UDP over the network for collection by a sniffer or a syslogd server). [...]
K800i UMTS modem over USB
I previously described how to PPP over GPRS via Bluetooth to a Sony-Ericsson K family mobile modem. With my previous K700i, using Dapper (I didn’t try with Edgy), talking to the modem via USB was very simple because the modem was reachable at /dev/ttyUSB0: the modem of my new K800i is reachable at /dev/ttyACM0 (I [...]
Sed removes empty ending lines
If for some reason you have to deal with a strange Apache that hangs serving PHP scripts ending with an empty line, you could find this sed based script I wrote useful. Of course you can use it as: find . -name “*.php” | xargs ./go
Using AWK to remove file extensions
Reading the referers of this website, I found that someone reached it querying a search engine for awk remove file extension Well, it’s definitely easy to achieve it if your files have just a “.” in their names. You can use this one-liner that works inverting the problem :) # substitute jpg with the extension [...]
Switching from fetchmail to getmail4
It seems to me that the fecthmail shipped with Edgy is rather buggy so I’ve just switched to getmail4. The configuration file to fetch emails from a POP3S server and pass them to procmail is: [retriever] type = SimplePOP3SSLRetriever server = xxxxxx.xxxxx.it username = xxxxx password = xxxxxxxxxx [destination] type = MDA_external path = /usr/bin/procmail [...]
PPP over GPRS via Bluetooth
This post describes what I’ve done to let my mobile phone connect to the Internet using PPP over GPRS on GNU/Linux. This tim_gprs_bt is a Bash script that sets up the serial cable over Bluetooth and starts pppd. This tim file is the sequence of AT commands sent to the GPRS modem. On the mobile [...]
