SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-Programming Mailing List Archives

Return to [ 06 | March | 2000 ]

<< Previous Message << >> Next Message >>


Date: Mon, 6 Mar 2000 05:47:37 PST
From: Peter Skye <pskye@peterskye.com >
Reply-To: scoug-programming@scoug.com
To: scoug-programming@scoug.com
Subject: SCOUG-Programming: Re: korn shell

Content Type: text/plain

dallasii@kincyb.com wrote:
>
> The thing in my mind that defines UNIX at the command line
> prompt is that each stage in a pipe occurs as a process
> that happens in parallel to the other stages of the pipe.
>
> As far as I know, this is not the case for all versions of
> DOS, OS/2, and any products from M$.

OS/2 parallels its command line "pipes" - I believe it's documented
(don't remember where) and the command line filters I run seem to act
accordingly.

I just tested the following on a large partition and the output appears
instantly, hence there's no "temporary" file on disk:

cd \
dir /s | find " "

The above starts in the root directory and does a DIR list of every file
on the drive. The FIND simply copies every line, since every line
contains at least one space.

DOS and DOS-based versions of Windows use a temporary file for a pipe.
_____

> Also the process control seems to be an area that OS/2
> doesn't quite have all the fine points that UNIX has.
> The little 'go' utility seems to provide rough
> equivalants to 'kill', 'ps' and 'fg' (restart in
> foreground), but what to replace the suspend character
> '^Z' and 'bg' (restart in background) with I don't
> know - maybe someone else has some suggestions?

Clueless here. I don't know anything about go, kill, ps, fg, bg and the
^Z suspend character. Are these all Unix commands?

> Another area I recall he had to make provision for is
> to handle file extensions, which was especially useful
> for .CMD files. The context that korn shell came up
> on this list was my finding that he didn't get it
> perfect, and some special provision was needed for
> putting REXX filters in pipes.

For those who've never seen a filter in Rexx, following is the framework
code from rxtt28 (a Rexx info file currently at version 30 [rxtt30] -
it's on Hobbes). I may have modified it slightly, I don't remember. (I
probably reformatted it since I indent all my "end" statements and
that's how this code is formatted.)

/* The FILTER.CMD Rexx program is a sample filter. It was taken from
RXTT28. */

/* Programmer's notes:
/ 1. Write all messages (error messages, logos, etc.) to STDERR
instead of STDOUT, e.g. use
/ call lineout 'STDERR', 'This is an error message'
/ 2. Always use
/ call trace 'OFF'
/ as the first statement in a filter program. This statement
makes sure that your program
/ ignores the environment variable RXTRACE.
/ 3. The function LINES() does not work as expected in
Object-Oriented REXX (it always returns
/ 0). Therefore, you must distinguish between the different
REXX versions in your filter
/ program.
/ 4. A filter program reads lines from STDIN and writes lines to
STDOUT.
/ */

/* Ignore the environment variable RXTRACE. */
call trace 'OFF'

/* 'SIGNAL ON NOTREADY NAME' catches the end-of-file condition. */
signal on notready name ProgramEnd

/* Check the REXX interpreter version. 'PARSE VERSION' is a REXX
command. */
parse version rexxVersion .
if rexxVersion = 'OBJREXX'
then do
/* Current REXX version is Object REXX. */
/* Main loop for Object REXX. */
/* (The loop is exited by a NOTREADY condition.) */
do forever
.output~lineout( .input~linein )
end
end
else do
/* Current REXX version is Classic REXX. */
/* Main loop for Classic REXX. */
do while lines( 'STDIN' ) <> 0
call lineout 'STDOUT', linein()
end
end

ProgramEnd:
exit 0
_____

> PS> And just out of curiosity, can ksh (if that's the name) be run _from_
> PS> CMD.EXE or do you have to modify the CONFIG.SYS line (SET
> PS> OS2_SHELL=x:\OS2\CMD.EXE)?
>
> Either way works fine, as I recall.
> My experience was that it's easiest not to completely scrap CMD.EXE,
> but to change your thinking about it. It's not a shell but a
> library of functions that are still useful in their own right.
> Between those, and what sed provides, with a few
> wrapper shell functions and alias's, you can emulate
> most of the basic UNIX commands, without cluttering up your
> file system with an excess of EMX ports of rather minor
> programs.

Good info, thanks.
_____

- Peter

=====================================================

To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".

For problems, contact the list owner at
"rollin@scoug.com".

=====================================================


<< Previous Message << >> Next Message >>

Return to [ 06 | March | 2000 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.