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 doneAnd now I'll hopefully remember it - at least I'll be able to find it here.
3 comments :
You can use
find . -name "*.jpg" | \
while read line; do \
...; \
done
pattern to make loop through files.
I wont as how you get hacks on http://blog.sweetxml.org/2007/03/valid-xhtml-blogger-navigation-bar.html
This page don't allow comments.
Seems that
also work!
Seems that
<!-- <body> -->
before 'body' also work!
Hi gavenkoa
Thank you for the BASH tip.
Regarding the other article I have no idea why comments are not possible, but my first guess is that the link somehow get hidden. I haven't looked at it for ages, but since my layout seems to be unchanged I guess they haven't changed it at all.
Happy Christmas
Brian
Post a Comment