Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old August 10th, 2007, 02:56 PM
Matt1776's Avatar
Matt1776 Matt1776 is offline
Recovering Intellectual
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2006
Location: Orange County, CA
Posts: 872 Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 20 h 17 m 51 sec
Reputation Power: 329
Send a message via ICQ to Matt1776 Send a message via AIM to Matt1776 Send a message via MSN to Matt1776 Send a message via Yahoo to Matt1776 Send a message via Skype to Matt1776
Other Language - Anyone have experience with "expect"?

I am trying to build a script that will check out some source code from a CVS repository ... automagically.

this is what I have so far, but it isnt working .. not sure why and the 'expect' program isnt the most documented thing out there:
Code:
#!/usr/bin/expect

spawn cvs co <project_name>
expect "user@cvs_host's password:" { send "<password>\r" }


problem I think im having is that what is returned from that command is two things:

1. Network latency
2. A massive message letting me know that if im stealing, im liable.

Quote:
Unauthorized access to this computer system and software is prohibited by Title 18, United States Code, Section 1030, Fraud and Related Activity in
Connection with Computers.
This system is for the use of authorized users only. Individuals using
this computer system without authority, or in excess of their authority,
are subject to having all of their activities on this system monitored and
recorded by system personnel.

In the course of monitoring individuals improperly using this system, or in
the case of system maintenance, the activities of authorized users may also
be monitored.

Anyone using this system expressly consents to such monitoring and is
advised that if such monitoring reveals possible evidence of criminal
activity, system personnel may provide the evidence of such monitoring to
law enforcement officials.
user@cvs_host's password:


question maybe is that do I have to 'expect' all that verbiage or just the last line? If so why isnt my original script working?
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.

Reply With Quote
  #2  
Old August 12th, 2007, 07:33 AM
Axweildr's Avatar
Axweildr Axweildr is offline
CPAN medic ...
Click here for more information.
 
Join Date: Mar 2003
Location: Location: Location:
Posts: 11,287 Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)  Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1Folding Points: 122403 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 1 Day 8 m 31 sec
Reputation Power: 2751
Send a message via Google Talk to Axweildr
Orkut
why not use Net::SSH::Expect in Perl?
http://search.cpan.org/~bnegrao/Net.../SSH/Expect.pod
Comments on this post
Matt1776 agrees!
__________________
--Ax
without exception, there is no rule ...
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


09 F9 11 02
9D 74 E3 5B
D8 41 56 C5
63 56 88 C0
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
-- Jamie Zawinski
Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...

Reply With Quote
  #3  
Old August 12th, 2007, 01:44 PM
Matt1776's Avatar
Matt1776 Matt1776 is offline
Recovering Intellectual
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2006
Location: Orange County, CA
Posts: 872 Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level)Matt1776 User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 3 Weeks 3 Days 20 h 17 m 51 sec
Reputation Power: 329
Send a message via ICQ to Matt1776 Send a message via AIM to Matt1776 Send a message via MSN to Matt1776 Send a message via Yahoo to Matt1776 Send a message via Skype to Matt1776
Quote:
Originally Posted by Axweildr
why not use Net::SSH::Expect in Perl?
http://search.cpan.org/~bnegrao/Net.../SSH/Expect.pod



Umm ... yes .. why not? I didn't know about this ...

Thanks! Also, thanks for the 'counter' in the other thread. ;0)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Other Language - Anyone have experience with "expect"?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway