![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| stop execution of script with in the script | dsdev_123 | AIX | 3 | 03-20-2008 11:57 AM |
| Script that doesn't stop | biot | UNIX for Dummies Questions & Answers | 3 | 11-30-2007 01:19 AM |
| Script does not stop when doing a read | rooseter | Shell Programming and Scripting | 7 | 11-05-2007 01:46 PM |
| stop Prstat using shell script | filthymonk | Shell Programming and Scripting | 19 | 05-23-2007 05:24 AM |
| Start/Stop Script | jjv1 | UNIX for Dummies Questions & Answers | 2 | 12-16-2003 04:28 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Script to run non-stop
Hi All,
I am on a Solaris OS and i have come up with a csh script named " mycshscript " which will grab data from a datalog file & format the grabbed data & upload formated version to web server. I would want to have this script to run non-stop so that the latest can be captured since data is always appending to the datalog file. Below is a skeleton of my script using a while loop to loop non-stop. My question is that 1) Does closing my command console stop the running of my script? 2) If i want to stop my script from running, how am i able to do it in a clean manner? Code:
#!/bin/csh set num = 1 while ($num == 1) ...... ....... end |
|
||||
|
Normally.
The traditional solution is Code:
nohup myprogram & This will (a) run the program in the background (b) ignore any SIGHUP generated by the terminal "hanging up". |
|
||||
|
Hi Porter,
1) How do i stop the process if i need to? 2) how do i need to create a while loop for this ? 3) If there's an echo command, will it be printed out ? 4) Do i need to add in the " nohup myprogram & >/dev/null 2>&1 " just like cronjob to remove all the echoing and printing command ? |
|
||||
|
Run it from a shell that when you try to exit the shell doesn't refuse because it complains you still have jobs running.
Quote:
Quote:
|
|
||||
|
Quote:
Its more like a warning and that could be very much ignored. |
|
||||
|
Quote:
If there's some mismatch in the input file which causes the script to output an error -> " Unrecognized command: ,$ p ". Will this be appended to the file "nohup.out" as well ? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|