The PIPE, the QUEUE and the Keystroke 
Author Message
 The PIPE, the QUEUE and the Keystroke

Bring up an OS/2 session and type

netstat -t

Now, how on earth can I get the output into my grubby hands without touching
the keyboard..?  (For the netstat-impaired, it's a Network Status report containing
spurious data regarding the network.  The first thing the prog asks for is to
press any key (1 page of info follows), then press any key again (next page of info
follows), another any key and another page of info.  Totally useless to a non-human
process!)

I've tried:

'netstat -t > netstat.results < a.key'

(with the file a.key having the character  'a' in it) and this doesn't get
passed the first prompt).

So, I tried:

'netstat -t > netstat.results | rxqueue'
queue 'f'
queue 'o'
queue 'o'

but to no avail.

Any ideas...?

Clive

(I know this isn't exactly REXX per se but it is to be incorporated (if!) in a rexx
script ;-) )

--
----------------------------------------------------------------------
              Clive Humble of Artists in Glass, England.

  "Where is the knowledge we have lost in information?
   Where is the wisdom we have lost in knowledge ?"      - T.S.Elliot
----------------------------------------------------------------------



Sat, 07 Aug 1999 03:00:00 GMT  
 The PIPE, the QUEUE and the Keystroke

Quote:

> Bring up an OS/2 session and type

> netstat -t

> Now, how on earth can I get the output into my grubby hands without touching
> the keyboard..?  (For the netstat-impaired, it's a Network Status report containing
> spurious data regarding the network.  The first thing the prog asks for is to
> press any key (1 page of info follows), then press any key again (next page of info
> follows), another any key and another page of info.  Totally useless to a non-human
> process!)

> I've tried:

> 'netstat -t > netstat.results < a.key'

> (with the file a.key having the character  'a' in it) and this doesn't get
> passed the first prompt).

> So, I tried:

> 'netstat -t > netstat.results | rxqueue'
> queue 'f'
> queue 'o'
> queue 'o'

> but to no avail.

> Any ideas...?

> Clive

> (I know this isn't exactly REXX per se but it is to be incorporated (if!) in a rexx
> script ;-) )

> --
> ----------------------------------------------------------------------
>               Clive Humble of Artists in Glass, England.

>   "Where is the knowledge we have lost in information?
>    Where is the wisdom we have lost in knowledge ?"      - T.S.Elliot
> ----------------------------------------------------------------------

I tried many things, involving redirection and piping, and none of them
worked.  I think that the problem is that netstat is not using STDIN: to
read the keyboard.  You may need some kind of keyboard stuffer.  Try to
find a copy of the IBM employee written software called APMT (a set of
REXX extensions), which will do this, among other things.

Good luck.

Barry



Sat, 07 Aug 1999 03:00:00 GMT  
 The PIPE, the QUEUE and the Keystroke

Quote:


> > Bring up an OS/2 session and type

> > netstat -t

> > Now, how on earth can I get the output into my grubby hands without touching
> > the keyboard..?  (For the netstat-impaired, it's a Network Status report containing
> > spurious data regarding the network.  The first thing the prog asks for is to
> > press any key (1 page of info follows), then press any key again (next page of info
> > follows), another any key and another page of info.  Totally useless to a non-human
> > process!)

> > I've tried:

> > 'netstat -t > netstat.results < a.key'

> > (with the file a.key having the character  'a' in it) and this doesn't get
> > passed the first prompt).

> > So, I tried:

> > 'netstat -t > netstat.results | rxqueue'
> > queue 'f'
> > queue 'o'
> > queue 'o'

> > but to no avail.

> > Any ideas...?

> > Clive

> > (I know this isn't exactly REXX per se but it is to be incorporated (if!) in a rexx
> > script ;-) )

> > --
> > ----------------------------------------------------------------------
> >               Clive Humble of Artists in Glass, England.

> >   "Where is the knowledge we have lost in information?
> >    Where is the wisdom we have lost in knowledge ?"      - T.S.Elliot
> > ----------------------------------------------------------------------
> I tried many things, involving redirection and piping, and none of them
> worked.  I think that the problem is that netstat is not using STDIN: to
> read the keyboard.  You may need some kind of keyboard stuffer.  Try to
> find a copy of the IBM employee written software called APMT (a set of
> REXX extensions), which will do this, among other things.

> Good luck.

> BarryYou can find APMT at the OS/2 Shareware BBS (bbs.os2bbs.com or

703-385-4325), but be aware that it may not solve your problem.  The
documentation states that the keyboard function is not guaranteed to have
the same effect as a user's keyboard input, and that it depends on how
the application processes keyboard messages.  I found this to be true
when I was trying to use it to log into a Netware Server through an OS/2
Window.


Tue, 10 Aug 1999 03:00:00 GMT  
 The PIPE, the QUEUE and the Keystroke


writes:
| Now, how on earth can I get the output into my grubby hands without touching
| the keyboard..?  (For the netstat-impaired, it's a Network Status report containing
| spurious data regarding the network.  The first thing the prog asks for is to
| press any key (1 page of info follows), then press any key again (next page of info
| follows), another any key and another page of info.  Totally useless to a non-human
| process!)

Try this:


Parse Pull line
Do i = 1 to Queued()
  Parse Pull line
  nw = WORDS(line)
  if WORD(line , nw) = "sl0" then do

  end
End

dIon, Multitask Consulting
Work:           http://www.multitask.com.au
NetRexx:        http://www.multitask.com.au/netrexx
RxExtras:       http://www.multitask.com.au/rxextras



Fri, 13 Aug 1999 03:00:00 GMT  
 The PIPE, the QUEUE and the Keystroke


Quote:

>writes:
>| ...The first thing the prog asks for is to
>| press any key...Totally useless to a non-human process!)

>Try this:

>/* Remove Slip routing entries */

>...

I believe the original request was for netstat -t .  I substituted that into
your script and it didn't work.  I'm not a rexx genius, so could you post
what changes are necessary so netstat -t would work?  Thanks.


Computer Sciences Corporation
(301)921-3206
FAX:(301)840-8934



Sun, 15 Aug 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. RM Cobol - piping keystrokes into LInux

2. Queue and Named Pipes

3. Queue and Named Pipes question

4. Piping stdout to a Rexx queue?

5. Piping command results into queue

6. Piping command results into queue

7. Help piping to queue?

8. Piping output to a queue

9. pipes vs queues

10. Queue Management or Pipes - any ideas?

11. CLASSes and QUEUEs (was: Re: QUEUE in QUEUE)

12. How to make a queue of queue's

 

 
Powered by phpBB® Forum Software