Student paper - GNU/Readline and tab-completion in bash
Hi! This is just a quick page I made for the purpose of gathering data via reddit
. I am looking into writing a student paper on GNU/Readline and tab-completion in bash. The kicker is - I gather some anonymised ~/.bash_history files and run a primitive analysis on them (estimate % on how many keystrokes could be saved if this person used the basics or everything readline has to offer, vs typing out each and every letter).
I've devised the following sed oneliner which turns middle octets of IP addresses into xxx and username@hostname into username@HOSTNAME, like this:
- 188.8.131.52 turns into 192.xxx.xxx.10
- firstname.lastname@example.org turns into examp@HOSTNAME
I believe that's a fair ballance between me getting something to work on, and you preserving your private data. The actual one-liner:
sed -e 's/\.[0-9][0-9]*\.[0-9][0-9]*\./.xxx.xxx./g' -e 's/@[0-9a-zA-Z.][0-9a-zA-Z.]*/@HOSTNAME/g' ~/.bash_history | tee anon_history_`date +%s`
Running this command you would get a file called something like anon_history_1302803916, please zip up and send that file to email@example.com
(putting a word anon in the Subject line would help auto-labeling). I hope to get the project done by summer, so please do send your files as soon as possible.
Sun Apr 17 17:30:12 CEST 2011
Thanks to everyone who contributed, about twenty guys sent history files from one or more servers. I'll revisit the reddit thread with news of my paper once I finish it (I am a lazy bum so it shouldn't be too soon).
Thank you, everyone!