Sunday, October 29, 2006

What's the problem with pre tags?

pencil icon, that"s clickable to start editing the post
note: This was written on my former drupal based blog.

It's been a while since I've posted anything, and during my last post i really had problems getting it right with pre tags, and if the went to the frontpage they would break the layout, and the right menu would go to the bottom of the page. Well it turns out that I'm not the first one with this problem, and it's theme specific, there is a hack for it on the drupul forum, so now it finally solved and I can happyli forget about all those workarounds I've tried before.

Read more

Saturday, October 28, 2006

Uhmm whitespaces in filenames, now what was it about the IFS....

pencil icon, that"s clickable to start editing the post

I had to rename som digital images, so startet to write a simpel for-loop in bash, but uhmmm ..... oh no I foregot that those whitespaces needs special attention. I googl'et it and found the needed help linuxquestions and of course also in The Advanced Bash-Scripting Guide

It ended something like this:
IFS=$'\n'
for filename in $(ls *.jpg)
do
 subFilename=$(echo $filename | cut -d' ' -f3)
 mv $filename [myNewPrefix]-$subFilename
done
And now I'll hopefully remember it - at least I'll be able to find it here.

Read more