what is the advantage of using the shell script even though we have better option to use c or c++ as the laguage to write the same programmes.
In unix there are lots of powerfull tools (sed, awk, grep, etc) which you use to build sophisticated scripts to extract and manipulate information, run sequences of applications, etc. etc. In practice you can usually solve the same problem in many ways, e.g. write a script, a C program, a Java program, a Python program, etc. However, certain tools suit particular applications and one selects the best tool at the time. For example, if one has an application which suits grep why rewrite it in C?