Snippet: Converting all .flac to .mp3 into the same directory

I needed all my flac as mp3 to play them on a device that does not support .flac. Heres how to convert them all:

export IFS="                                                                                                                                          
"
for file in `find /home/claw/Musik -name *.flac` ; do echo "converting $file" && nice -19 sox $file `echo $file | sed 's/\.flac/\.mp3/g'`   ; done

You may have to install sox and libsox-fmt-mp3:

apt-get install sox libsox-fmt-mp3

Taskwarrior: List tasks when opening a terminal

Taskwarrior logo Taskwarrior: List tasks when opening a terminalOriginally i am a lazy dude and i do not want to be reminded of my pending tasks. That is why i am not forcing my self often to type ‘task’ into the terminal.

In order to solve that problem i had to think about a solution that will constantly remind me of my pending tasks and forces me to complete them.

Continue reading

Taskwarrior: My task-switch for fast switching between multiple databases

Taskwarrior logo Taskwarrior: My task switch for fast switching between multiple databasesTaskwarrior is a command-line todo list manager
I use it at work and at home, but that made some problems to me. It has become very confusing which task belongs to which group of my life.
Do i have to call Mr. Miller for private thing or for business ?

For solving this problem i wrote a tiny bash script and i want to share it with you
Continue reading

Endless while loop

Diesen Artikel gibt es auch in Deutsch!
This is a short How-to for a while loop which echoes “LOOP!” :

while(true)
do echo "LOOP!"
sleep 3
done
  • while: starts the loop (in the brackets there is the constraint). Because an undefined variable is always “true” the loop will restart endless.
  • do: Contains what the loop should do. For this example it echoes “Loop!”.
  • sleep X – The script wait X second before continuing. (3 seconds here).
  • done – Ends the loop

You can save the script and run it in shell using “bash SCRIPTNAME” or use “chmod a+x” to make it runnable and start it by clicking at it.