![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to exit a while true loop | Noob e | Shell Programming and Scripting | 5 | 08-26-2007 03:44 PM |
| Method to exit a for loop | Rohini Vijay | Shell Programming and Scripting | 2 | 11-01-2006 05:56 AM |
| Need Clean Exit from KSH Status Loop | ScottKe | Shell Programming and Scripting | 2 | 08-30-2006 05:53 PM |
| while loop exit | Terrible | Shell Programming and Scripting | 3 | 07-28-2006 06:20 PM |
| keystroke trap | vasikaran | UNIX for Dummies Questions & Answers | 1 | 07-04-2005 09:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
csh exit while loop on keystroke
#!/bin/csh
I'm using a `while(1)` loop to dispaly real-time information about various files on my system, and I use ^C to exit it when needed. I was hoping there was a way to exit the script on a normal keystroke such as "q". Can someone point me in the right direction? I'm willing to use a different method for looping if needed. Thanks, -Seg |
|
||||
|
That's not really what I'm trying to do, besides that code is for sh, not csh. Anyway, I'm running a loop where there is no prompt for user input, the script clears the screen, displays info, sleeps for 1 second then starts over. I'd like to break out of the loop at any time using a standard key stroke rather than ^C.
|
|
||||
|
That is true, but moving to C++ will allow me much more versatility in the program. As my managers would say "moving forward" I will need to add many more functions to it and being just minimally realistic about it, it's going to need to be in something more capable and secure than a 20 line shell script.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|