tcl and print

Quick post,

I got a lot of image file that has to be printed, of course I could fire my gimp and print it one by one, but since (again) I am in lazy mood, and beside that I am in linux, so I could use my command line power rigght? rigggght.

so I open my tcl (don’t ask why I choose tcl :P)
and do this

% set filelist [exec ls]
% foreach file $filelist { lpr $file }

sweet, no I just go browsing and wait for my file .

only use if you in linux, and already installed cups, and tcl heheh


me and BeanShell

Recently I got an assignment to fool around with a java library, Since I
kind in bad mood, I was thinking a way to fool around with an easy
way, not using code, compile, see because it’s just too much work. So
I remember about java scripting, there are lot of scripting in java
today, here some of it bsh, groovy, jacl, jython, rhino and others.

So I’ve to pick up one from many, I started with bsh, since the
syntax resembling java syntax with some improvement (pre java 5.0). So
I started to download it [ in ubuntu bsh already in synaptix ], and
start to playing around with it.

my first problem is how to add a jar to bsh classpath, luckily in bsh
documentation, there is a command to add jar into classpath,
here’s my snippet

BeanShell 2.0b4 - by Pat Niemeyer (
bsh % addClassPath("lib/my.jar");
bsh %

after that, I smoothly played around with the API. so bsh can be a
tool for black-box testing, and I quite satisfied using it. I know
that the other scripting can be use for it, but for now I keep with
bsh for black box testing.