Re: [ Attn: Randy ] Ad-hoc Parsing?
From: Percival (dragontamer5788_at_yahoo.com)
Date: 12/18/04
- Previous message: Randall Hyde: "Re: Extensible Modules (EMs) to HLA Adventure"
- In reply to: Herbert Kleebauer: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Next in thread: Herbert Kleebauer: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Reply: Herbert Kleebauer: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 18 Dec 2004 15:09:45 -0500
Herbert Kleebauer wrote:
> Percival wrote:
>
>>Herbert Kleebauer wrote:
>
>
>
>>Practical flexibility vs real flexibility. I can write and compile
>>programs inside a shell, and then run the thing. Doesn't mean that it is
>>practical.
>
>
> You are right, this isn't practical. And here is the great advantage
> of DOS batch programs compared to unix shell scripts, you don't have
> to include the source code, you can direct include processor instructions.
> This is possible because the com file format doesn't have any header
> but is nothing than a pure sequence of processor instructions.
>
> For example, you can include the following lines to output a byte
> to the data bus of the parallel port (at least in DOS/Win9x):
>
> @echo off
> echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>out.com
> echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU!WvX0GwUY Wv;ovBX2Gv0ExGIuht6>>out.com
> echo ?@}IIHpkg~K=H?H_CgRNWH?wpBmNEFQNS@CbwH@S?pkoECIQ{_K?\qoCve>>out.com
> echo {Sx{X?{Eu@Pq`Dkfk?a@o{A@CoCEFr@B@K~Tj~@CeK??BB0x>>out.com
> out.com ff 378
Mind you, this would only be considered useful here, on an assembly
discussion board, where people can actually read that :)
And, i don't see any advantage to actually writting something in
assembly, and using the assembler, compile out.com, then distributing
out.com with the file.
>>IMO, unix shells are more powerful because of the standard
>>tools offered. Such as grep, find, with pipes so you can find every
>>file, and print them to the printer if you wanted.
>
>
> The tools have nothing to with the shell. You can install all this
> tools also in Windows. But for me it is essential, that the script
> also can be executed when the tools are not available (if you copy
> your script to an other computer and somebody has removed one of
> the tools the script needs). And if all you need is included in
> the script in form of a few processor instruction (echo is an
> internal command), the this script can be executed even if there
> is nothing but the shell itself on the PC.
echo works the (nearly exact) same way on *Nix systems.
Now, the difference is, on *Nix systems, grep and etc are expected to be
on the system, standard, as standard as command line, unless you are a
crazy bozo.
>>Then again, i don't
>>remember a && thing in Windows command line (if the last thing failed,
>>then dont continue) but perhaps it is just my lack of experiance with
>>Windows command line.
>
>
> Not in Win9x/Me but in NT/W2k/XP
My mistake then.
>>However, i do know this. Unix shells actually have functions. Windows
>>command line, no functions.
>
>
> ???
I mean, user defined functions
Like this in bash:
#!/bin/bash
function blah() { #this is a function
echo Hello World!!;
}
blah #call the function twice
blah
Not using cygwin btw, that thing sucks. Who cares if it is C like or
whatever.
But I digress. Command line either way, is more powerful than the GUI,
on windows or on *nix.
Percival
- Previous message: Randall Hyde: "Re: Extensible Modules (EMs) to HLA Adventure"
- In reply to: Herbert Kleebauer: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Next in thread: Herbert Kleebauer: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Reply: Herbert Kleebauer: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|