Whatever you can do with a shell script, you can do with Perl and python too or in general any scripting language. However, These languages have advantages and disadvantages over each other.
Here are a few reasons why we use the scripts.
- You can write a script to initialize something at the boot time of the system. so you don’t need to do it manually.
If you want to run a particular application to run every time when your system boots then you can write a shell script to do this for you Instead of doing it manually it will do it whenever your system starts. - You can write a script that installs per-requisite and build the code with user input to enable/disable some features.
If you are a system admin and you need to install some application for your system or virtual machines with n number of machines it will reduce your time to type manually for each system. - To kill or start multiple applications together.
If you are a performance Tester and want to run multiple instances of the same applications you can write a script to lunch multiple instances of an application.When you measure the performance. - To observe a large database of files and find some patterns out of it.
If you are a database administrator or database tester monitoring the performance of a database in the production environment that 24*7 will be a hectic job. Where is the script that can do your task on behalf of you? - System boot scripts (/etc/init.d)
- System administrators, for automating many aspects of computer maintenance, user account creation, etc.
- Application package installation tools More detail
- Application startup scripts, especially unattended applications (e.g. started from cron or at)
- Any user needing to automate the process of setting up and running commercial applications, or their own code.