Re: [ Attn: Randy ] Ad-hoc Parsing?

From: Percival (dragontamer5788_at_yahoo.com)
Date: 12/19/04


Date: Sat, 18 Dec 2004 23:11:18 -0500

Herbert Kleebauer wrote:
> Percival wrote:
>
>>Herbert Kleebauer wrote:
>
>
>>>echo {Sx{X?{Eu@Pq`Dkfk?a@o{A@CoCEFr@B@K~Tj~@CeK??BB0x>>out.com
>>>out.com ff 378
>
>>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.
>
> Because if you have a collection of utilities on your computer
> which you frequently use in your scripts and then transfer one
> of the scripts to an other computer, then there always is
> at least one utility which is used by the script and which
> you have forgotten to copy. You don't have this problem
> if all is include within the script.

Winzip :)
Then just put pkzip or something small on the disk.

(BTW, I see your point and i'm just poking fun now.)

>>>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.
>
>
> Yes, but you don't have a so simple executable file format
> like com files in DOS, which are nothing but CPU instructions
> (so you can generate executable files using printable ASCII
> characters only).

Well. It can't. The entire Unix model was built to be as far away from
the machine as possible. Thank goodness too, or else shell scripts
wouldn't have made the switch from PDP-11 to whatever system Unix is on
now. Though you do give a good point, and I accept your point.

>>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
>
> call :sub "hello world"
> call :sub "hello again"
> goto :eof
>
> :sub
> echo %1
> goto :eof

In that case :) Shows how little I go on Windows now.

Well, it seems everything that Unix shells have that Windows doesn't
have, is that you can rely that Unix has grep or sed just about as much
as Windows has WordPad. Almost all Unix machines have grep or sed
installed by default. And like Windows Wordpad, they could be removed.

Percival



Relevant Pages

  • Re: Execute unix batch from a windows program
    ... > where we can execute scripts to generate file extracts. ... There is a unix ... > scheduler that runs every night and FTPs those files on to our windows ...
    (microsoft.public.scripting.wsh)
  • Execute unix batch from a windows program
    ... We've a windows environment here and we use telnet to log into a unix server ... where we can execute scripts to generate file extracts. ... scheduler that runs every night and FTPs those files on to our windows server. ...
    (microsoft.public.scripting.wsh)
  • Re: Any info about "Thread has exited with code 32772 (0x8004)"?
    ... Seriously, one of the great things about using Windows is that I rarely write batch files, ... One of the things I universally detested about Unix and Unix philosophy was that you could ... Scripts and pipes were the answer to every problem. ...
    (microsoft.public.vc.mfc)
  • Re: SCP from AIX to Windows problem
    ... I've OpenSSH running on a windows machine and my Unix ... copy files without a trouble using scripts. ... Check option "StrictModes no" in sshd_config on Windows Server. ... via a batch script, I've generated the public key and have tried placing ...
    (AIX-L)
  • Re: Problems with exec()
    ... I'm writing a Java GUI for the text parsing program called "Apple Pie ... the program was written in Unix C and have an executable file ... My program's being written in Windows, ...
    (comp.lang.java.programmer)