Re: [ Attn: Randy ] Ad-hoc Parsing?
From: Herbert Kleebauer (klee_at_unibwm.de)
Date: 12/28/04
- Next message: Percival: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Previous message: Betov: "Re: Announcing the"
- In reply to: Phil Carmody: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Next in thread: Percival: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Reply: Percival: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Reply: Phil Carmody: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Dec 2004 20:36:11 +0100
Phil Carmody wrote:
> Herbert Kleebauer <klee@unibwm.de> writes:
> > > Oh joy - the kook technique of out-of-context quotes. Let's go and
> > > see what the context is first...
> >
> > No out-of-context quotes. This quotes shows, that you were
> > speaking of shell programing in Unix/Linux compared to shell
> > programming in DOS/Windows:
>
> 1) They were out of context quotes, as the quotes came with no context.
The quotes are context free. The only purpose of this quotes
was, to proof that you have also spoken about shell programming in
Unix/Linux and not only about shell programming in DOS/Windows
(using bash and cmd.exe).
> However, like the troll or crank that you are, you've _removed_ the
> context that I put back in. That's _exceptionally_ impolite usenet behaviour.
No need for a context in a context free statement.
> > ===================================================================
> > From: Phil Carmody <thefatphil_demunged@yahoo.co.uk>
> > Subject: Re: [ Attn: Randy ] Ad-hoc Parsing?
> > Date: 26 Dec 2004 23:21:14 +0200
> > > > It can execute the .com file as easily as a command.com or cmd.exe batch file can.
> > Now you want to tell us, you have only spoken about bash in
> > Windows (so it can execute .com files) and not about bash
> > in Linux and that you didn't compare scripting in Linux with
> > scripting in Windows.
>
> Bull***. Still steaming, too, it appears.
>
> Where do I claim that I have _only_ spoken about bash in Windows, and
10 lines above.
> not about bash in Linux? Cite or retract. AGAIN - and get it right this
> time (i.e. retract - you're citing ain't worth ***).
The whole sub thread is about the statement, that batch scripting in
DOS/Windows is at least as flexible as csh/sh/bash scripting in
Unix/Linux. The reason is, that there is a header free executable
file format in DOS/Windows which makes it possible to directly
embed cpu instructions within a DOS/Windows batch script. Now, you
claimed, that this also is possible with bash scripts. When you
had to recognize that this is not possible with bash scripts
in Unix/Linux you tried to escape by separating bash from Unix/Linux:
But when I restrict they use of bash to DOS/Windows, then my
statement "It can execute the .com file as easily as a command.com
or cmd.exe batch file can" becomes true. But this is completely
out of the context of the complete sub thread. You could also have
said: But when I introduce a new, header free executable file format
in Unix/Linux, then my statement becomes true.
The statement "It (bash) can execute the .com file as easily as
a command.com or cmd.exe batch file can" without the addition
"when bash is used in DOS/Windows" is not true. If it were true,
than bash used with any operating system had to be able to execute
.com files.
> > "But they (unix scripts) can't be more flexible than
> > DOS/Windows batch scripts, where you can directly
> > insert processor instructions into the script. Anything
> > a computer can do, a DOS/Win batch script also can do."
> Your logic is a bit broken
> bad logic, as you can more easily make an executable dropper in
> the unix shells (sh/bash/csh/tcsh/zsh/ksh) as you can in batch
> files
You still didn't get it. Because of the size of executables,
it isn't practical to embed executables (Linux or Win32 programs)
within a script (therefore it doesn't matter how easy it is to
extract the executable from the script). But in DOS/Windows you
you can directly include CPU instructions.
echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5>in.com
is nothing but this CPU instructions:
68 3150 move.w #$160^$3030,-(sp)
58 move.w (sp)+,r0
35 3030 eor.w #$3030,r0
50 move.w r0,-(sp)
5b move.w (sp)+,r3
50 move.w r0,-(sp)
5a move.w (sp)+,r1
42 inc.w r1
42 inc.w r1
42 inc.w r1
66 68 23236223 move.l #$23236223,-(sp)
66 58 move.l (sp)+,r0
66 2d 24604056 sub.l #$24604056,r0
66 50 move.l r0,-(sp)
66 5d move.l (sp)+,r4
66 33 2f eor.l (r3.w),r4
66 31 2f eor.l r4,(r3.w)
35 2b2b eor.w #$2b2b,r0
75 35 bne.b $160
And this is possible because of the .com file format.
> There is provably more functionality in the unix shells, this
> I can't live without features like independent stdout/stderr
> redirecting and ${//} in bash, and the powerful single and double
> quoting rules in all sensible unix shells, so I certainly can say
> that I need the additional flexibility that bash gives me.
Sorry, but that is "functionality" but not "flexibility". I never
said, that bash isn't much more powerful than comannd.com/cmd.exe.
In this sub thread "flexibility" was defined by:
"T.M. Sommers" wrote:
> One of the biggest advantages of Unix-like shells
> is that they allow the user to do things that the creator of the
> shell never imagined.
Now let's make a little test how flexible bash is. Let us do
something which "the creator of the shell never imagined"
(maybe the creator of the bashl had imagined this, so it is build
into bash already, then we will have to find another example).
Suppose you have a script which installs a program XYZ and
you want to ask the user whether he really wants to install
XYZ or not. Now, because also people with bad eyes should
be able to read the question, you want to use a big font
and you also want a YES and a NO button which can be clicked
with the mouse (as an alternative to pressing the y or n key).
Here a solution for DOS/Windows which don't even use the
advanced features of cmd.exe so it can also be executed
in pure DOS.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>y_n.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>y_n.com
echo ?g{F?pKp?rLRaDNgRw?GOL?K?gEC=F_a~?A_on?hSzAG?x?Wir?k?F@MtJ>>y_n.com
echo @S?~szCwnItL?SwFgbyR?_ND???MuaFz?G@=?gOL?KR?wAQIyA?DxA?AzA>>y_n.com
echo AT=EwOLbyR?_xQY_z?C_=?C_LAYp@wOGrL?K?ewAHrLbv?OvA_eCcuvRgb>>y_n.com
echo AWGHAwev?LvA]pAauCAebEL@sqXsUCLco{_KU?sm{Sx{FOgkt\wK@cL?Bo>>y_n.com
echo LWOsBw`GrL?K@b?MHVslQpOrguvRF=A?It?spGHMuvQN=Ae@s?@OB=PBNs>>y_n.com
echo ?s_ujJrdXTM__O?_nP?S??G@?pG@?o0x>>y_n.com
y_n.com Do you want to install XYZ?
if errorlevel 1 echo Installing XYZ
if not errorlevel 1 echo Not installing XYZ
del y_n.com
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Now show us a much easier solution using bash/Linux.
- Next message: Percival: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Previous message: Betov: "Re: Announcing the"
- In reply to: Phil Carmody: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Next in thread: Percival: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Reply: Percival: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Reply: Phil Carmody: "Re: [ Attn: Randy ] Ad-hoc Parsing?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]