When I started my career in IT field, I have landed into windows world, as I know that no companies give chance to a fresher to work on production Linux/Unix servers. Its a good experience to work on DOS scripts(aka Batch programming). There are many similarities/differences/advantages/disadvantages between Batch programming and Shell scripting. Lets see what they are.


Sl.NoBatch programmingShell script
1Sequential execution of  group commands in a batch fileSequential execution of  group command in shell scripts
2Can read inputs from usersCan read inputs from users
3Has control structures such as for, if, while, switch for better automating/scriptingHas control structures such as for, if, while, switch for better automating/scripting
4Supports advanced features such as Functions and Arrays Supports advanced features such as Functions and Arrays
5Supports regular expressions(using findstr)Supports regular expressions
6Can include other programming codes such as perl(ie.. in middle of dos script we can include some other programming language code for effective scripting to get our desired output)Can include other programming codes such as Perl, AWK, SED etc.

Sl.NoBatch programmingShell script
1Lack of richness of tools/commandsHave good number of tools(as of my knowledge there are more than 75000 commands in Linux/Unix)
2Supports only one vendor(i.e. windows)Supports for number of vendors such as Sun/apple/IBM AIX/HP-UX/GNU Linux etc.
3No other variants for DOSThere are number of variants such as bash, ksh, csh, zsh etc..
4Low capabilities of integrating with other programming code in batch scriptingGood capabilities of integrating other programming code in shell script
5Cannot handle complex regular expressionsCan handle complex regular expressions.
6A batch file should always end with .batThere is no such concept like file extension, but a shell script file permission should be set to executable.
7To execute a batch program just enter the file name at CLITo execute a shell script, here are the ways to execute it
1)chmod +x shellscript.sh;./shellscript.sh
2)sh shellscript.sh

Good article on how to convert your Batch program to a Shell script.