Intorduction to shell scripting

In windows we use turbo c or dev c++ for programming in c language or in c++.Simillary for programming in linux we use shell.What is meant by shell? By definition it is stated as, A shell is a program that provides the traditional,text-only user interface for Linux and Unix-like operating system.Its primary function is to reade commands that are typed into a console in a GUI and then execute them.Shell programmin is mainly used on top of kernel as an interface for user and hardware of the system.

They are different types of shells available, most popular among them are:

  1. Bourne shell
  2. C shell
  3. TC shell
  4. Korn shell
  5. Bourne again shell


Bourne shell is wide spread shell for programming in linux and unix.In this post we shall discuss about basic commands of bourne shell.
It is always nice to have all files in a place.Therefore we shall create a folder of desired name.So to

  1. create a folder we use the key word mkdir,syntax is mkdir folder_name.
  2. To chane to the folder we use cd keyword,syntax is cd folder_name
  3. To create a file we use the keyword vi followed by file name and extension of the file,syntax is:vi file_name
  4. To assign the permissions to a file use keyword chmod,syntax is:chmod permission_code filename Eg:chmod 777 even.sh
  5. To list all the files present in the file we use the keyword ls,syntax is:ls
  6. To list the files with their premission we use the keyword ls-l,syntax is:ls-l
  7. To exit from current folder use the keyword cd,syntax is:cd
Advertisement

About Anuroop D

Very enthusiastic about technology and likes to share my knowledge through blogging. Has Bachelor's in Information Technology and currently pursuing my PhD in Computer Science.
This entry was posted in Shell scripting and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s