[olug] Expect script help...

Daniel Linder dan at linder.org
Sun Aug 29 05:53:00 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So close, yet so far... :)

<quote who="David Walker">
> The following code splits on the open parentheses, takes the 2nd value,
> and then trims off the close parentheses.
>
> set output "linderd     pts/2     Aug 26 10:32   (10.120.15.88)"
> set output_array [split $output "("]
> set ip [lindex $output_array 1]
> set ip [string trimright $ip ")"]
> set MYDISPLAY "${ip}:0"

I think this is the winner here, folks! :)  I just wrote a test script on
what my output will look like and this appears to work.  For Jay and
everyone else interested, I'll try to give a full report on Monday as to
the exact output and full source code.

Dan

- - - - -
"I do not fear computer,
I fear the lack of them."
 -- Isaac Asimov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBMW88NiBNyqUzGb8RAg87AJ40t5ibrq2wuRQqPQGIGgpIhF4SRQCeJ0mF
LVzw7K+xo5ArKBtEB8bWFew=
=EXmC
-----END PGP SIGNATURE-----



More information about the OLUG mailing list