Re: [tcljava-user] '|' as a separator of distinct commands
Brought to you by:
mdejong
From: Ross, B. <Bil...@Ca...> - 2012-10-26 13:25:16
|
I am not sure what you are trying to accomplish. I have used tcl with expect to communicate with Cisco devices. My script runs on a linux box I have been able to send the "|" character and capture and recognize it. There are a few times where I struggled getting some characters to work. I can send you some code if that is what you are trying to do. From: liobod tcl [mailto:lio...@gm...] Sent: Friday, October 26, 2012 5:56 AM To: tcl...@li... Subject: [tcljava-user] '|' as a separator of distinct commands Hello world, Sorry if my topic is irrelevant considering this list. In such case, you may gently tell me where this post would be more appropriate! I'm trying to mock some network equipments (Cisco, Juniper, Whatever, ...) shell on on a linux shell. My problem is the '|' character : - on most of those equipments, '|' is considered as an arg of a command - on a linux shell, '|' is a separator of distinct commands I though tcl could help me to jump over this issue. After i have installed tcl-8.4.13-4.el5.x86_64.rpm, I did some scripting through tclsh, tclshrc with no success. By now, I'm still digging a full java solution trying to recreate a console from scratch based on jacl. I've been playing with http://www.ensta-paristech.fr/~diam/tcl/online/Using_Tcl_in_Java-20010106.html I did compile (except ConsoleThread.safeEvalCommand) and run it but i cannot figure out how insert my custom commands. If any of you did face my need and/or this particular issue or found an alternative solution, i'd be glad to get some return on experience. In one word, i'm afraid to face a dead-and problem soon. And before i get completely stuck, i wonder if some of you guys could give me a track... thanks. |