Convert DOS batch files to shell scripts

  
 

A lot of programmers who are learning scripts on a PC are running DOS. In fact, the disabled DOS batch file language can still write some powerful scripts, although they generally need to rely on external Tools. So, at some point, we still need to convert old DOS batch files to UNIX shell scripts. In general, doing this is not difficult, because DOS batch file operations are just equivalent shell scripts. A restricted subset of .

Table L-1. Batch file keywords/variables/operators, and equivalent shell symbols

Batch file operator Shell script equivalent Symbol Meaning % $ Command Line Parameter Prefix /- Command Option Tag \\ /Directory Path Delimiter == = (equal) String Comparison Test!==! != (unequal) String Comparison Test

Copyright © Windows knowledge All Rights Reserved