tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* vdump behaviour
@ 2001-12-13  1:18 MacDonell, Dennis
  0 siblings, 0 replies; only message in thread
From: MacDonell, Dennis @ 2001-12-13  1:18 UTC (permalink / raw)
  To: tru64-unix-managers


Hi,

I'm trying to control an autochanger through a  backup script using expect
on a tru64 5.0+ server using vdump to do the dumping. I'm having a little
bit of trouble getting expect to sort out the messages sent back by vdump.
For some reason expect is not line oriented, whereas I would like to be able
to pick up the lines like

vdump: Change Tapes: Mount tape# 0002
vdump: Dumping 577153022 bytes, 1407 directories, 28905 files
vdump: Dump completed at Tue Dec 11 14:03:08 2001
vdump: can't open device file </dev/ntape/tape4_d1>; not ready

but these lines always seemed to get lumped in with other lines of data that
were sent at the same time by vdump. 

I've been using 
   expect { pat {code} [; pat {code} ] ... } 
   where pat is of the form   -re "((path|dev|type|advfs)\[^\r]*)\r" and
code is just some expect/tcl code. 

The example pattern is supposed to pick up any line that starts with a path
or a dev or a type or a advfs followed by a string not including a \r
followed by a \r. However when it enters the relevant code block for the
pat, a print out of expect_out(0,string) indicates that it matched a
pattern, but a print out of expect_out(buffer) indicates that that match
took a lot more out of the buffer than you would have expected. The actual
match could have been in the middle of the whole buffer. 

I have enough patterns in the script to pick out each vdump line as a
separate pattern matching exercise, but when I write out inside the {code}
section what is being captured by each pattern, I see that whole chunks of
lines are being soaked up by a pattern. Can anyone sort me out on what is
going on.

Dennis

######################################
Dennis Macdonell
Systems Administrator
National Mapping Division, Geoscience Australia
mail: PO Box 2, Belconnen, ACT 2617
email: mcdonell@auslig.gov.au
ph:  61 2 6201 4326
fax: 61 2 6201 4377
######################################

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-13  1:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-13  1:18 vdump behaviour MacDonell, Dennis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox