A feature I love with the csh / tcsh

The foreach command which I never remember how to do, is a very powerful tool in the csh, which is missed in bash.

For those who don’t know it, foreach can be used in the command line interface (cli) in csh, unlike some other shells.

With foreach you can do some very simple directory work without having to first make a shell script.

Below is a very simple way of using the command.

First lets prepare something to work with, create a test dir that can be easily be removed afterwards

# mkdir test && cd test

Prepare some directories. these can also be files if you want to work with this.

# mkdir 1 2 3 4 5 6 7 8 9

The few commands to populate each directory from 1-9 with a file called test

# foreach file (*)
# cd $file && touch test && cd ..
# end

Now go and take a look in each directory, and you’ll see a file called test.

Reverse airflow on aquarium air pump

Aquarium airpumpI recently bought an aquarium pump (this one http://bit.ly/mGSbB5) from dealextreme. It’s a 3w airpump with rubber feet, and nice plastic casing. So I hacked it to reverse the airflow so it would suck air rather than blow. This is due to that I need it to suck away fumes/smoke when soldering. It took me little time to figure out how such a thing worked, and so I hacked it. Not a problem when using hot glue.

It reversed the airflow, but not enough. I had to have the soldering iron just beneath the plastic hose before I could see any effects. So I upgraded it, I drilled some larger holes where the air could flow through, also some holes in the casing itself to make sure the air inside could get out. But with no major luck I still needed to put the hose just above the soldering iron. The smoke didn’t even change direction when the hose was 1 cm away.

Ok the hose is around 5 Meters in length. I’ll go to the pet shop tomorrow and get me another hose that I can cut and adjust as I see fit. The hose I’m using now is meant for water cooling in a PC.

Else I think I’ll need something that can move some air. I don’t think the 5W airpump that DX also have will make any difference.

 

Movie – 2012

Movie 2012Just watched the movie 2012 on Blu-Ray.

Though it was good entertainment, it was pretty predictable and much alike to The Day After Tomorrow. There was a lot of beautiful and realistic CGI in the movie.

But I must confess that some scenes were too much Hollywood action where 1 Meter or 1 second made a difference, unlike Day After Tomorrow.

It had a good selection of known actors, most surprisingly Danny Glover whom I don’t remember seeing in movies after Maverick (Mel Gibson) and Lethal Weapon 4.