Wednesday, June 29, 2011

GET FIRST AND LAST DAY OF A MONTH IN BASH SHELL

GET FIRST AND LAST DAY OF A MONTH IN BASH SHELL




Linux system comes with a date commend. The man page has all the details. The following shows how to get the first date and last day of a month using the date commends in bash shell.

First Day, current month:
# date -d "-0 month -$(($(date +%d)-1)) days"

First Day, last month:
# date -d "-1 month -$(($(date +%d)-1)) days"

Last Day, current month:
# date -d "-$(date +%d) days +1 month"

Last Day, last month:
# date -d "-$(date +%d) days -0 month"

Last Day, month before last month:
# date -d "-$(date +%d) days -1 month"

%d = day of month.


Tuesday, June 28, 2011

Spinach Eggs Recipe

Spinach Egg  Recipe (for kids)

Ingredients

Pin It

Instructions

1. Clean the Spinaches.

2. Prepare the eggs. In a small bowl, Put a bit of salt and a 1/3 of coffee spoon of Oliver oil. Beat eggs and mix well until color and texture are uniform throughout.


3. Heat the pan, add one tea spoon of Oliver Oil in to the pan and let it heat up. Pour the egg mixture into the pan. Set the burner on low. Flip the egg to let both sides of the eggs to developing a leathery brown skin. Make sure not to over cook.
4. Chap eggs into small pieces and set aside.

5. Boil hot water in a pot. When the water is boil, put Spinaches into the hot water for 30 seconds.


6. Put Spinaches into a basket and wait for the water to drain out.


7. Chap the Spinaches into small pieces and mix them with the eggs in saucepan. Add one coffer spoon of sugar and a slice of butter. Optionally, add one spoon of Oyster Source (optional) and a coffee spoon of Mrs. Mrs. Dash Seasoning Blend. Please make sure that Oyster Sauce will be fine with the people who you want to serve. Some kids, may not like Oyster Sauce. Heat and stir the mix for about 30 seconds.


8. Put the eggs and spinaches mix into an egg molds. And it ready to server



Pin It

After Dinner Books:


Tuesday, June 21, 2011

SQL Jam


A funny SQL song ...