Monthly Archives: February 2010

Shuffle chars usind sed, tr and shuf

echo “shuffle me” | sed ‘s/./&\n/g’ | shuf | tr -d ‘\n’; echo eflfmh seu Advertisements

Posted in Bash/Shell, Linux | Leave a comment

Get “Top n” occurences in text files

I searched a way to get the “Top n” occurrences in a text file. The solution is described in http://encodable.com/tech/blog/2008/12/17/Count_IP_Addresses_in_Access_Log_File_BASH_OneLiner. cat /path/to/access.log |awk ‘{print $1}’ |sort |uniq -c |sort -n |tail In my case I had a logfile containing method … Continue reading

Posted in Bash/Shell, Linux | Leave a comment