Re: An end to tweaking?
From: mikek ("mikekcenter)
Date: 07/12/05
- Next message: Dances With Crows: "Re: Edit multiple files with vi"
- Previous message: gary: "Re: Are there any other killer-apps like mc ?"
- In reply to: Chris Barts: "Re: An end to tweaking?"
- Next in thread: comp.os.spil: "Re: An end to tweaking?"
- Reply: comp.os.spil: "Re: An end to tweaking?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Dances With Crows: "Re: Edit multiple files with vi"
- Previous message: gary: "Re: Are there any other killer-apps like mc ?"
- In reply to: Chris Barts: "Re: An end to tweaking?"
- Next in thread: comp.os.spil: "Re: An end to tweaking?"
- Reply: comp.os.spil: "Re: An end to tweaking?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|