HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- scrap doubt
Operating System - HP-UX
1833883
Members
1795
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2003 07:04 PM
09-20-2003 07:04 PM
scrap doubt
Hi ,
I have an expect script which is working fine , when run from command line . But the same expect file is not working correctly
when it is invoked from scrap file .
In the expect script i am executing "ls" command and I want my program to wait for the timeout to happen ( I am not putting any
matching patterns under expect command except timeout ) . You can run the expect script from the command line and see its behaviour ( correct ) .
Here I am attaching the expect script and scrap file for your reference.
************
expect file : tt.exp
***************************************
#! /usr/local/bin/expect
proc spawn_proc {args} {
global temp_id
puts "\t$args"
eval spawn $args
return $spawn_id
}
set timeout 100
spawn_proc ls
expect {
timeout { send_user "\nTimed out\n" }
}
# Wait for timeout to occur
puts "program completed successfully "
*********************************************
scrap file : tmp.zmf
***********************************************
#! /usr/local/bin/scrap -f
5 minute timeout
STDOUT_DEBUG=1
STDERR_DEBUG=1
JAGae29081 {
{
name is JAGae29081_1
keywords JAGae29081_1
args /tmp/tt.exp
run
}
}
But When I run my expect script through scrap file ( " ./tmp.zmf -C ) I am getting two errors .
1. The program is not waiting till the timeout happens ( 100 secs in this case). It is just coming out immediately after executing "ls" command.
2. In the error log file ( 2_JAGae29081_1 file created under build dir when tmp.zmf is run using "-C" option ) it is printing the following error.
error writing "stdout": bad file number
while executing
"puts "program completed successfully ""
(file "/opt/ids/test/agent/idsagent/tt.exp" line 19)^M
Any pointers in fixing this problem are highly appreciated.
TIA,
Vara.
I have an expect script which is working fine , when run from command line . But the same expect file is not working correctly
when it is invoked from scrap file .
In the expect script i am executing "ls" command and I want my program to wait for the timeout to happen ( I am not putting any
matching patterns under expect command except timeout ) . You can run the expect script from the command line and see its behaviour ( correct ) .
Here I am attaching the expect script and scrap file for your reference.
************
expect file : tt.exp
***************************************
#! /usr/local/bin/expect
proc spawn_proc {args} {
global temp_id
puts "\t$args"
eval spawn $args
return $spawn_id
}
set timeout 100
spawn_proc ls
expect {
timeout { send_user "\nTimed out\n" }
}
# Wait for timeout to occur
puts "program completed successfully "
*********************************************
scrap file : tmp.zmf
***********************************************
#! /usr/local/bin/scrap -f
5 minute timeout
STDOUT_DEBUG=1
STDERR_DEBUG=1
JAGae29081 {
{
name is JAGae29081_1
keywords JAGae29081_1
args /tmp/tt.exp
run
}
}
But When I run my expect script through scrap file ( " ./tmp.zmf -C ) I am getting two errors .
1. The program is not waiting till the timeout happens ( 100 secs in this case). It is just coming out immediately after executing "ls" command.
2. In the error log file ( 2_JAGae29081_1 file created under build dir when tmp.zmf is run using "-C" option ) it is printing the following error.
error writing "stdout": bad file number
while executing
"puts "program completed successfully ""
(file "/opt/ids/test/agent/idsagent/tt.exp" line 19)^M
Any pointers in fixing this problem are highly appreciated.
TIA,
Vara.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP