- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Simulate "Enter" Key in script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО10-22-2004 04:22 AM
тАО10-22-2004 04:22 AM
Typically one keys text into RCS, and RCS waits for the "Enter" key before going on to the next command. The checkin process does not complete until a period (.) is entered on the final step. The unix script would have a series of RCS commands for each of the 100+ modules. Is there a way of coding the "Enter" key into the script? I've tried a few things, but the script just hangs after the first command.
A typical series of commands would be:
ci -l filename <== checkin and lock filename
??? <== Hit Enter
Time change <== text keyed in explaining what the modification was
??? <== Hit Enter
Changed by yours truly <== second line of text keyed in
??? <== Hit Enter
. <== Period (.) to indicate that I'm done entering text
??? <== Hit Enter
The last "Enter" will indicate that I'm done with the checkin, and RCS will be exited.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 04:31 AM
тАО10-22-2004 04:31 AM
Re: Simulate "Enter" Key in script
http://hpux.ee.ualberta.ca/hppd/hpux/Tcl/expect-5.41/
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 05:20 AM
тАО10-22-2004 05:20 AM
Re: Simulate "Enter" Key in script
Try the following:
echo "\n\n\n...\n"| your_script
or this:
your_script<<$$END_OF_INPUT
$$END_OF_INPUT
Each empty string is ENTER
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 05:21 AM
тАО10-22-2004 05:21 AM
Re: Simulate "Enter" Key in script
echo "\n\n\n\n" | ci -l filename
Doesn't work?
Hmmm... Maybe ci reads from STDERR. Try-
echo "\n\n\n\n" | ci -l filename 2<&0
See if that works...
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 06:12 AM
тАО10-22-2004 06:12 AM
Re: Simulate "Enter" Key in script
Beyond that point the process is hanging no matter what variations of echo or END_OF_DATA statements I try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 06:23 AM
тАО10-22-2004 06:23 AM
Re: Simulate "Enter" Key in script
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 06:32 AM
тАО10-22-2004 06:32 AM
Re: Simulate "Enter" Key in script
I will give it a try :-)
ci -l filename <
echo "Changed by yours truly"
echo "."
EOF
will this work for you ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 07:38 AM
тАО10-22-2004 07:38 AM
SolutionA typical series of commands would be:
################################
ci -l filename <
text explaining what the mod was
second line of text
.
EOD
################################
The blank lines above should feed in as "Enter" to the ci program.
- Tags:
- here doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 09:48 AM
тАО10-22-2004 09:48 AM
Re: Simulate "Enter" Key in script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2004 09:52 AM
тАО10-22-2004 09:52 AM