Shell Scripting Commands for beginners – Part 1

July 16th, 2010 by Ajay View Comments »

I’m presently working on Solaris Sun server and hence I needed to use unix shell scripting commands for working on it. I went through various tutorials and gained some knowledge about it and now I’m writing the commands with example for your reference. Let me know if you have any query.

What is Shell Scripting?

A shell is a command interpreter turns text that you type (at the command line) in to actions runs a program, allows you to edit a command line and can establish alternative sources of input and destinations for output for programs.

Unix uses shells to accept commands given by the user, there are quite a few different shells available. The most commonly used shells are SH(Bourne SHell), CSH(C SHell) and KSH(Korn SHell), most of the other shells you encounter will be variants of these shells and will share the same syntax, KSH is based on SH and so is BASH(Bourne again shell). TCSH(Extended C SHell) is based on CSH.

Basic Unix Commands:

1)      ls : Lists all the files and folders in the current directory.

-a    Lists all entries, including those that begin  with  a dot (.), which are normally not listed.

-i    For each file, prints the i-node number in  the  first column of the report.

-l    Lists in long format,  giving  mode,  ACL  indication,  number of links, owner, group, size in bytes, and time of last modification for each file (see above). If the file  is  a  special file, the size field instead contains the major and minor device numbers. If the  time of  last  modification is greater than six months ago, it is shown in the format `month date  year’  for  the POSIX  locale. When the LC_TIME locale category is not set to the POSIX locale, a  different  format  of  the time  field  may  be  used.  Files modified within six months show `month date time’. If the file is  a  symbolic  link,  the filename is printed followed by “->” and the path name of the referenced file.

Eg: ls –a | ls –l etc.,

2)      mkdir: Creating a new directory in the current directory.

Eg: mkdir ajay -> Will create a new directory named “ajay”.

3)      grep: Search a keyword in the current context.

Eg: ls –l |grep “ajay”

Here we are listing all the files in the current directory and searching whether any file or directory has the name “ajay”. “|” (pipeline symbol) is used to combine both the commands together.

4)      echo: Print the variable.

Eg: echo “ajay” or echo ajay

This will print ‘ajay’ in the next line and will return to the next line for getting next command.

5)      cd: Change directory. Used for changing from current directory to some other directory.

cd .. – used for going back to the previous directory.

cd <directory_name> – moves to the directory mentioned if it is present inside the  current directory.

Eg: cd ajay

This will move the control to the directory named “ajay”.

P.S. Enough for the day. Will get you more commands in the coming posts.

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Adding a year extra to my Age

July 10th, 2010 by Ajay View Comments »

July 9, 2010 00:00 AM, I received the first bump for my 22nd B’day at Bangalore. Prem and I share birthday on the same day. Prem’s roommates (Srini, Manoj, Hari, Satyaraj) along with my room mates (Prasanna and Karthik raja) celebrated it in Prem’s room like a blast. I received B’day calls from almost every one of my friends.

The next bump was at my workplace where we celebrate everyone’s birthday in our project. I had a great time here at Bangalore.  It was totally a great experience being away from home and living with friends.

Greeting designed by my Colleague(Ramukumar)

This time my B’day gift is Nokia 5530 Xpress music from my mom which I received it two weeks before my B’day since I knew I will be celebrating my B’day here in Bangalore. Last time it was Pulsar 150, which I can never forget which was the biggest of all, next added to the list is my new mobile.

P.S. Photos coming soon..

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Google refurbished Google News

July 1st, 2010 by Ajay View Comments »

The first thing I do for the day is visiting either the Google’s News page or the Times of India’s epaper edition. Today I came across the Google News and just saw what’s happening in the U.S. To my surprise Google has refurbished the News with a new ‘News of you’ option which will get a survey of what kind of news you read, what genre, etc.

Based on this Google will store it and display the news based on that particular section for you, each time when you visit the Google News page. Also in the right pane, Google has made a total change in the display of the news and updates. It shows the Google News which has been posted recently, News which is topping the charts, World cup football 2010 updates which are rising everywhere and Google has not left that too.

The most important one is that, they track our location using our IP address and they display the weather forecast for today and the next 2 days. This is something new for the Google News page where there is no need to set our State/Country, while Google will identify it and will update it accordingly.

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Mozilla Firefox 4 coming on the way with tabs on top

July 1st, 2010 by Ajay View Comments »

Earlier we have seen different versions of Firefox released after the release of Google Chrome which has taken the position of Firefox in the top usage by users worldwide. Now its time for Firefox to get again into the competition with their next version of Firefox handling various issues which Google Chrome and Safari does. It will also have a newly installed JavaScript Engine which will be useful for easy execution of the scripts.

They are coming up with a new look to the browser which looks similar to the Google Chrome’s featured browsing which possesses the tab bar on the top and the address bar placed inside in the tabbed widows. The above image will give you a gist of how it will be and it is clear that the first version will have some bugs and those bugs will be cleared as soon as people test the browser and report them soon after the release.

To my experience, I loved using Firefox until the Google Chrome came into existence and I like it since the version 3 of Firefox looked less user friendly. The speed of the browser also was seemingly less compared to Chrome since Chrome uses cached browsing which makes you to reduce the internet usage. Hope Firefox 4 lives up to my dreams ;)

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Question #2: Identify the words in the Image

July 1st, 2010 by Ajay View Comments »

Can you read the words in the image below?

If you cannot, accept the defeat and read below:

Answer:

Close your eyes nearly to 90% and see this image. You will get the answer.

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Time to resume feeding ‘Life is an Experiement’

June 30th, 2010 by Ajay View Comments »

You could have noticed no sign of activity in this blog(Life is an Experiment). Yeah, it has been almost 2 months without any posts. I realized that my blog is starving and it’s time for me to feed my blog with some good content which will make it to regain its old shape.

I have noticed that even though there was no activity in the blog, my blog has been visited by atleast 50 people per day which has brought to 9,000 people from January 2010 and with almost 75+ registered users reading my blog via email whenever it gets updated. I have put on the green button which was already set to red by me. I have almost settled down in Bangalore and it’s time for me to resume to my hobby which kept me on the go right from 2008.

I have already mentioned in many of my posts that blogging makes you feel relaxed, now I feel the real need for relaxing a bit after getting 3 months of training in Bangalore and now getting into the working environment here in my office. With a desire to win, I stepped into Bangalore and I got almost everything I wanted for making my life filled with colorful memories and this blog stands as a fragrance for it.

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Pics: Hogenakkal trip

May 8th, 2010 by Ajay View Comments »
Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Bye Bye Dawn

May 7th, 2010 by Ajay View Comments »

After a whole lot of entertainment, learning and training we are leaving the “Dawn” training hall in my office here in Bangalore. We were put up in “Dawn” for almost 45 days and we enjoyed each and every moment in the training hall. Even after finishing our training we found the “Dawn” to be empty and we tried our best to retain in the same hall even if we don’t have anything to do with the training hall.

The day has come and we need to give an end to the entertainment we had in “Dawn” till the last minute. Today, 07 May 2010, was our last day at “Dawn” and I dedicate this post for my fellow colleagues and friends who shared this training hall with me for the past few days.

Pics for remembrance:

PS:

FRP peri asked me remove his picture. :X. Don’t ask me what does FRP stands for. :P

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Foray for frolic fun at Hogenakkal

May 4th, 2010 by Ajay View Comments »

The man behind the plan for the Hogenakkal trip, Encounter Ekambaram* made our day on Sunday as we went on to decide about the trip to Hogenakkal on Sunday and we started planning about our trip on Friday after returning home from the office and we made sure we execute the plan successfully.

After many additions and deletions in the members for the trip, we finally came to the conclusion that only 8 of us (Chandru, Srivash, Peri, Prasanna, Manas, Darshan, Anandh and me) will be enjoying the trip. Encounter Ekambaram was having a tough time on Saturday as his stomach was upset after having some extraordinary food.

Let’s begin the Trip:

It was the day when every one will be sleeping till 10am, a bright sunny Sunday. We got up at 6am and began to prepare for our trip which we had decided to start from 6 30am. At around 6 45am everyone assembled in the place we had mentioned and we began our journey when the clock was striking 7. We felt the breath of the early morning and started moving towards Hogenakkal in a Tata Sumo which we had taken for rent from a travel agency.

On the course of the journey, we reached palacode at almost 9am and finished off our breakfast. We continued our journey and while traveling, we had great conversations going over and here is Zoo Zoo dog’s comment:

Cauvery originates from Himalayas

Oh my god! What a statement that he has learnt from his primary school. We were laughing for almost 15 minutes for this statement alone. Finally we reached Hogenakkal at almost 10 30am. There you can spot many people asking you,

Boat venuma sir (Do you want any boat sir)?

Being in a place where there are lots of boats for traveling in water, you cannot come across Hogenakkal without hearing them. On witnessing the crowd over there, our mood for enjoyment increased and we started moving to foray into the small boats (parisal in tamil) and initiate our enjoyment in water.

Catch a glimpse of the pictures in my next post.

While we were in water we were throwing the ball and playing in the running stream of water which dragged us from one place to another with its full strength, even with our 100% energy we could not go against the water. It was an awesome environment to have fun with the guys. When we were taking bath in the falls, Mastermind and Killer Shetty were wondering what was biting them in the water. Oops, Zoo Zoo dog, Nokia and Encounter Ekambaram were saying that it’s the fishes which were playing in our heals. Even Gabbar could feel it even though he was sitting on the rock and keep his legs in the water and taking snaps.

After the whole lot of entertainment and joy we had our lunch at almost 3pm and began to start to Bangalore again. Every one was almost dried up except Gabbar and Zoo Zoo dog. You can see them taking the pictures in the car:

*Character Updates:

Encounter Ekambaram – Srivash – The man with Pink shirt (his lucky one, always lucky), the man behind the plan for Hogenakkal. Encounter specialist when it comes to killing opponent in the game.

Mastermind – Chandrasekar – The master who has a great mind which will be full of confusions in taking decision whether to go to his cousin’s house for washing his clothes. :D . A soft natured guy in real life but tough guy to handle in playing games.

Gabbar – Manas – The foreign player for our cricket team who is the only person who has a extraordinary of hitting Zoo Zoo dog. A cool guy with lots of tricks in his mind.

Prad$ – Prasanna – The face pack guy who will be perfect in his works and plans his works as expected and makes the best out of the plan. A good team mate to work with, creative, strategic. energetic and enthusiastic.

Nokia – Anandh – A simple guy who will be always thinking of something which he himself doesn’t know what he is wondering about.

Killer_SHetty – Darshan – A Killer when it comes to playing games but a cool fellow who knows many languages in our gang.

Zoo Zoo dog – Periyakaruppan – What not to tell, you can add what ever name to his first name and it will suit him. For more details, see his previous character updates here.

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz

Dawn to lawn

May 2nd, 2010 by Ajay View Comments »

Are you wondering how “Dawn” relates with “Lawn”? Then its time for you patiently read another post of mine which depicts how I related “Dawn” with “Lawn”. :)

jack_dawn

With lots of expectations I entered my training at Wipro Technologies in Bangalore and now I’m done with my training and it’s time to be free until I get my posting location. In the course of this training period we were put in a training hall which is named as “Dawn” for almost a month and its really very sad to leave the hall since our training got over and we were said to wait until we get our location and now its time for us to sit in the lawn and pass our time by simply coming to the office and swipe our id’s for attendance.

This is how I relate “Dawn” with “Lawn”. :D

Share this post:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Add to favorites
  • email
  • Yahoo! Buzz