27 май, 2014


Bash script to unzip one or more zip files into newly created directories and open each directory in separate xfce4 file explorer window (thunar).

for file; do
    unzip -x "$file" -d "$exdir"
    thunar "$exdir"

20 ноември, 2013

Watch Emerging package in gentoo

Run the emerge command and redirect the output to a file.
Then watch which package is being emerged.
nohup emerge -DuNv @world &
watch 'grep Emerging nohup.out|tail -n1'

Don't do it like me before:
watch eval echo '\"$(grep Emerging nohup.out|tail -n1)\"'

10 септември, 2013

afterlines.sh - Print the number of lines after last occurance of the PATTERN in the LOGFILE



function exit_usage() {
 echo "USAGE: `basename $0` PATTERN LOGFILE
Print the number of lines after last occurance of the PATTERN in the LOGFILE" >&2
 exit 22

if [ $# != 2 ]; then

if [ ! -e "$LOGFILE" ]; then
 echo  "The file '$LOGFILE' does not exists!" >&2

grep "`grep "$PATTERN" "$LOGFILE" | tail -n 1`" "$LOGFILE" -A 99999999|wc -l

23 декември, 2012


Какъв е краят, който търся? Това е една тема, толкова важна за мен, че предпочитам да мълча за нея. Но колкото повече мълча, толкова по-важна става тя за мен. Какъв е краят, който аз желая? Чий е този край? На аз? Мен ли няма да ме има? Не може да бъде. То май наистина не е. Хич го няма. Ех този край, за който все желая да мълча, дано да бъде хубав, а дотогава, не сега.

12 октомври, 2012

Are computers able to live and to change? Real understanding believes in real things. When you understand something, really, you believe that something is real. When you believe in it you don't want to change it. In real understanding there are real things but what we seem to forget is that these things are only real understandings from the Superstanding. There are three levels of understanding, as said Hermes Trismegistus. Copying or repeating is the first level of translation. Interpretation is the second. Interpretation is like singing a song for God. You can find thousands of words about It and you won't be wrong as long as your heart is seeing It. The third level of understanding is translation of one thing inside another understanding. This is when you allow your understanding to live and to change. Computers are good in copying and repeating. They are doing pretty well in translating from one language to another which is almost like knowing what you are talking about no matter which exact words you name It. Are computers able to live and to change? Am I able to recognize the understanding outside me? Sometimes yes, sometimes no, sometimes who knows It?

13 февруари, 2012

List files in current directory recursively, sorted by modified time.

find . -type f -print0 |xargs -0 ls --full-time --sort=time

22 януари, 2011

Едно изречение и други глупости

Ако имаме всичко, ще се наситим твърде бързо.
От това, което имаме, ще имаме да взимаме,
ама друг път.