Re: An end to tweaking?

From: mikek ("mikekcenter)
Date: 07/12/05


Date: Tue, 12 Jul 2005 10:15:15 +1000

Chris Barts wrote:
> On Mon, 11 Jul 2005 09:01:52 -0700, comp.os.spil wrote:
>
>
>>I used to write batch files under DOS. I even had Neil Rubenking's
>>Batch File Lab Notes, which had so much info it boggled my mind. The
>>original batch language was *very* sparse, but he got it to count four
>>digits with recursive algorithms and make the screen sprout legs and
>>tap dance with ansi.sys commands and debug scripts.
>
>
> Doing /anything/ recursive with DOS batch makes my head hurt. ;) It was a
> very, very sparse language indeed, and perhaps the best that could be said
> about it is that going from DOS batch to VMS is easier than going from the
> average Unix shell to VMS.
>
> But who needs to move to VMS these days?
>
>
>>Fast forward to today and we have a guy named "tab" complaining about
>>"endless" tweaking. Shirley, there must be an end to tweaking
>>somewhere.
>>
>>(1) Once you have written the shell script (I assume it's the
>>equivalent to batch processing, I hope it's better) you should just
>>start *using* the computer. The Matrix thread from a couple of weeks
>>ago suggested you can load drivers, thunks, and needed utitilies to run
>>an app, then unload them when it's finished so you can run another app.
>>All without rebooting.
>
>
> True. And yes, bash (the default shell under Linux) is /much/ better than
> DOS batch. For example:
>
> # Mass-convert all .gif files in the current directory to .png files.
>
> for i in *.gif # Iterate over all files that end in .gif.
> do
> n=`basename $i .gif` # Remove the extension.
> giftopnm $i | pnmtopng > $n.png # Do the conversion with pipes.
> done
>
> You can save that to a file and it will be a first-class command from then
> on. You don't need to care that it's written in shell instead of C or Perl
> or COBOL. You can write it all out on the command-line, too, if you don't
> expect you'll ever need to mass-convert .gifs to .pngs again.
>
> (Pardon me if I ramble for a while. I don't know if DOS batch had
> pipes.)
>
Dos batch files have | > < though i am not sure about >> and <<.
Dos batch files are sparse compared to shell scripts, that probably why
ms produced WSH



Relevant Pages

  • Re: Multi-zip files -- Windows server
    ... native DOS versions). ... TO BATCH OR NOT TO BATCH ... and using a batch file to try and solve the problem... ... The IBM PC operating system command line is a most ...
    (comp.sys.cbm)
  • Beginners questions: running programs
    ... I'm currently interested in learning vbscript for the same purposes as ... batch language: manipulating files and running programs from a DOS ...
    (microsoft.public.scripting.vbscript)
  • Re: An end to tweaking?
    ... > Batch File Lab Notes, which had so much info it boggled my mind. ... Doing /anything/ recursive with DOS batch makes my head hurt. ... bash (the default shell under Linux) is /much/ better than ... You can save that to a file and it will be a first-class command from then ...
    (comp.os.linux.misc)
  • Re: Search c drive and copy files of a certain extension
    ... to a standard maintenance problem that can be resolved in a single line ... his head at your "verbose" DOS. ... a 1 line batch script wasnt really an option because user permissions ...
    (microsoft.public.scripting.vbscript)
  • Re: Terminal Server 2003 Sessions dont close when exiting a DOS application
    ... Did you change to the batch file's properties to "Close on Exit"? ... End a disconnected Session after: ... partiular DOS program you will only affect those users - not everyone... ... >> Terminal Services using Windows Server 2003. ...
    (microsoft.public.windows.terminal_services)