- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shell hpux Question
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
Forums
Discussions
Discussions
Discussions
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
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
01-19-2004 03:03 AM
01-19-2004 03:03 AM
Shell hpux Question
How can I quit a loop like "while" simply pushing a keyboard key whith HPUX V11.0 shell ?
Is it possible ? so what is the command ?
Thank's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 03:06 AM
01-19-2004 03:06 AM
Re: Shell hpux Question
If it's in the background just kill it.
kill
Regards,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 03:07 AM
01-19-2004 03:07 AM
Re: Shell hpux Question
enter stty
and you *should* see that
intr = Contol-C
you may map this differently if you want - at your own risk...
Regards,
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 03:08 AM
01-19-2004 03:08 AM
Re: Shell hpux Question
You can type "ctrl-c" to quit the loop. If it didn't work try "ctrl-\".
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 03:14 AM
01-19-2004 03:14 AM
Re: Shell hpux Question
Besides ^C for interrupt you can try the quit sequence which is typically ctrl-backslash or the kill sequence which is typically ^U
Run
stty -a
to get the mappings for your current term type & session.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 03:26 AM
01-19-2004 03:26 AM
Re: Shell hpux Question
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 04:23 AM
01-19-2004 04:23 AM
Re: Shell hpux Question
Excuse me for my english, I'm french
your solution is better for me, but can you please give me an example.
Thank's again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 04:32 AM
01-19-2004 04:32 AM
Re: Shell hpux Question
#!/usr/bin/ksh
trap "a=1" 2
a=0
while [[ "$a" = 0 ]] ; do
echo hello
done
echo fini
This will loop echoing "hello" until the ctrl-c is pressed. The trap statement will set a=1 and the while loop will exit.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 04:56 AM
01-19-2004 04:56 AM
Re: Shell hpux Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2004 05:56 AM
01-19-2004 05:56 AM
Re: Shell hpux Question
This helps other users looking for similar solutions...
-- Rod Hills