>> Delete No. 42718 article
No. 고수님 이 에러 어떻게 해결해야 하져?

등록 2002-02-18 15:48:00 By localhost     조회 2
이름 임승택    

		정말 질문을 무지 올리는데 답변이 하나도 없네여 ㅠ.ㅠ
정말 형편없는 질문을 해서 그런건지 ... 휴~ 답답하네염.
 expect를 이용하여 패스워드 변경하는 스크립트입니다.
머가 잘못된건지 모르겠네여. 고수님들 한수 부탁드려요.
<스크립 내용: passwd.sh>
#!/usr/local/bin/expect
 set id [lindex $argv 0]
set newpasswd [lindex $argv 1]
 spawn passwd $id
 expect -r "New UNIX password:"
send "$newpasswd
"
expect -r "Retype new UNIX password:"
send "$newpasswd
"
interact
 이상 스크립에 있는 내용입니다.
그런데 이 스크립을 실행하면
 #]passwd.sh test test01
spawn passwd test
Changing password for user skygod
New UNIX password: can't read "newpasswd
": no such variable
    while executing
"send "$newpasswd
""
    (file "./passwd.sh" line 9)
 이런 에러가 떨어지네염.. 해결책 없을까여?
으~~ 미치기 일보직전이네염..
 OS : 알짜 redhat 6.2 <- 이넘 문제가 아닌가 싶습니다. 다른곳에 문제가
     안되었던거거든염.
expect : expect-5.32
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved