Entries Tagged as ''

Batch Rename File

I have created a photo album and uploaded to my web server. However, surprisingly, those photos didn’t show up. After troubleshooting, I noticed, some of photos have GB2312 code in the file name. So, I need to batch change them to UTF-8 code. The following is tcsh script, which can replace all “unknown-char” to “photo”.

#!/bin/tcsh

foreach i (*.jpg)
echo $i > /tmp/filename
set j=`sed -e ‘s/unknown-char/photo/g’ /tmp/filename`
mv “$i” “$j”
rm /tmp/filename
end

Happy Christmas

(Happy Xmas Kyoko
Happy Xmas Julian)

So this is Xmas
And what have you done
Another year over
And a new one just begun
And so this is Xmas
I hope you have fun
The near and the dear one
The old and the young

A very Merry Xmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

And so this is Xmas
For weak and for strong
For rich and the poor ones
The world is so wrong
And so happy Xmas
For black and for white
For yellow and red ones
Let’s stop all the fight

A very Merry Xmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

And so this is Xmas
And what have we done
Another year over
A new one just begun
And so happy Xmas
We hope you have fun
The near and the dear one
The old and the young

A very Merry Xmas
And a happy New Year
Let’s hope it’s a good one
Without any fear
War is over, if you want it
War is over now

Happy Xmas