home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / DO.C < prev    next >
C/C++ Source or Header  |  1997-07-05  |  400b  |  21 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  DO.C - a simple facility for specifying multiple commands
  5. */
  6.  
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9.  
  10. main(int argc, char *argv[])
  11. {
  12.       if (2 > argc)
  13.       {
  14.             puts("Usage: DO \"DOS command 1\" \"DOS command 2\" ...");
  15.             return -1;
  16.       }
  17.       while (--argc)
  18.             system(*++argv);
  19.       return 0;
  20. }
  21.