Sponsored Content
Top Forums Shell Programming and Scripting Help with script, shutdown if no ping responce Post 302156268 by ringofsteel on Monday 7th of January 2008 05:23:25 PM
Old 01-07-2008
hmm still no luck, it works fine aslong as i run it manually, putting it in that file doesnt seem to make any diffrence atall.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remote shutdown script

Dear all I would like to shutdown multiple servers remotely with the issue of one single command. What is the command to shut down a server remotely (ie, I want to issue a command on server X to shutdown server Y and server Z). Thank you (2 Replies)
Discussion started by: soliberus
2 Replies

2. UNIX for Advanced & Expert Users

Shutdown script

Hi Guys, I want to execute few of my bash script, so that whenever someone calls shutdown now -r command, I want my script to execute first before shutting down. Any help please????? I've just started playing with the unix system, so far its been brilliant.... (10 Replies)
Discussion started by: alpha_manic
10 Replies

3. Shell Programming and Scripting

Script not waiting for user responce

hi all, Im fairly new to scripting and am having a noobish issue. Ive got a script that checks for certain directories and if they dont exist, prompts the user to do a mkdir. heres trouble spot in the script: cat dirlsttemp.dat | while read dir; do echo "$dir does not exist, would you... (3 Replies)
Discussion started by: rdudejr
3 Replies

4. UNIX for Dummies Questions & Answers

A script for shutdown

I want to make a script to shutdown a unixware computer from other user then root. In Sco version i use "as root" but in the unixware i don't know. Please help me. 10x (12 Replies)
Discussion started by: kelu
12 Replies

5. HP-UX

Shutdown script

Hi, I am on Alpha Server with HP Tru64 system. I wish to setup shutdown to automatically and cleanly shutdown informix during the shutting down of the system. Ie. I was trying to use rc0.d to do this but failed. Has anyone tried doing this before? I already have the script and linked it to... (0 Replies)
Discussion started by: kingsto88
0 Replies

6. Shell Programming and Scripting

Script sh for shutdown

Hi, i need shutdown a pc, is in the same network what command i can use in the script :o ? (1 Reply)
Discussion started by: Dymblos
1 Replies

7. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

8. Shell Programming and Scripting

Shutdown Script

Im writing a script to read a file called shutdown.cf and shut down any scripts that are listed there. I have came up with the following based on things I saw in similar programs but it doesn not work: Has anybody any idea what I may be doing wrong? Cheers Paul (4 Replies)
Discussion started by: runnerpaul
4 Replies

9. Shell Programming and Scripting

how to grep the responce on TL1

Hi All, I'm a newbie here.. how can i grep the data when i receive responce from TL1 example: responce from TL1: blabalbalbalbalba.,lbalba,SUCCESFULL,blahblahbalabh... how can i grep the "SUCCESSFULL" while i'm running the script? is it possible? because i'm only to know is if... (2 Replies)
Discussion started by: nikki1200
2 Replies

10. Shell Programming and Scripting

db shutdown script

I am going to create shutdown database script. We have dabase shutdown script. But i need take dabase which online and make it down. I got user id which needs to dabase to down ID=`ps -ef | grep -i pmon | grep -v grep | awk '{print $1}'` ( got orace side DB=`ps -ef | grep -i pmon |... (1 Reply)
Discussion started by: allwin
1 Replies
DOCHECKGROUPS(8)					    InterNetNews Documentation						  DOCHECKGROUPS(8)

NAME
docheckgroups - Process checkgroups and output a list of changes SYNOPSIS
docheckgroups [-u] [include-pattern [exclude-pattern]] DESCRIPTION
docheckgroups is usually run by controlchan in order to process checkgroups control messages. It reads a list of newsgroups along with their descriptions on its standard input. That list should be formatted like the newsgroups(5) file: each line contains the name of a newsgroup followed by one or more tabulations and its description. docheckgroups will only check the presence of newsgroups which match include-pattern (an egrep expression like "^comp..*$" for newsgroups starting with "comp.") and which do not match exclude-pattern (also an egrep expression) except for newsgroups mentioned in the pathetc/localgroups file. This file is also formatted like the newsgroups(5) file and should contain local newsgroups which would otherwise be mentioned for removal. There is no need to put local newsgroups of hierarchies for which no checkgroups control messages are sent, unless you manually process checkgroups texts for them. Lines beginning with a hash sign ("#") are not taken into account in this file. All the newsgroups and descriptions mentioned in pathetc/localgroups are appended to the processed checkgroups. If exclude-pattern is given, include-pattern should also be given before (you can use an empty string ("") if you want to include all the newsgroups). Be that as it may, docheckgroups will only check newsgroups in the top-level hierarchies which are present in the checkgroups. Then, docheckgroups checks the active and newsgroups files and displays on its standard output a list of changes, if any. It does not change anything by default; it only points out what should be changed: o Newsgroups which should be removed (they are in the active file but not in the checkgroups) and the relevant ctlinnd commands to achieve that; o Newsgroups which should be added (they are not in the active file but in the checkgroups) and the relevant ctlinnd commands to achieve that; o Newsgroups which are incorrectly marked as moderated or unmoderated (they are both in the active file and the checkgroups but their status differs) and the relevant ctlinnd commands to fix that; o Descriptions which should be removed (they are in the newsgroups file but not in the checkgroups); o Descriptions which should be added (they are not in the newsgroups file but in the checkgroups). The output of docheckgroups can be fed into mod-active (it will pause the news server, update the active file accordingly, reload it and resume the work of the news server) or into the shell (commands for ctlinnd will be processed one by one). In order to update the newsgroups file, the -u flag must be given to docheckgroups. When processing a checkgroups manually, it is always advisable to first check the raw output of docheckgroups. Then, if everything looks fine, use mod-active and the -u flag. OPTIONS
-u If this flag is given, docheckgroups will update the newsgroups file: it removes obsolete descriptions and adds new ones. It also sorts this file alphabetically and improves its general format (see newsgroups(5) for an explanation of the preferred number of tabulations). EXAMPLES
So as to better understand how docheckgroups works, here are examples with the following active file: a.first 0000000000 0000000001 y a.second.announce 0000000000 0000000001 y a.second.group 0000000000 0000000001 y b.additional 0000000000 0000000001 y b.third 0000000000 0000000001 y c.fourth 0000000000 0000000001 y the following newsgroups file (using tabulations): a.first First group. a.second.announce Announce group. a.second.group Second group. b.third Third group. c.fourth Fourth group. and the following localgroups file (using tabulations): b.additional A local newsgroup I want to keep. The checkgroups we process is in the file test which contains: a.first First group. a.second.announce Announce group. (Moderated) a.second.group Second group. b.third Third group. c.fourth Fourth group. If we run: cat test | docheckgroups docheckgroups will output that a.second.announce is incorrectly marked as unmoderated and that its description is obsolete. Besides, two new descriptions will be mentioned for addition (the new one for a.second.announce and the missing description for b.additional -- it should indeed be in the newsgroups file and not only in localgroups). Now that we have checked the output of docheckgroups and that we agree with the changes, we run it with the -u flag to update the newsgroups file and we redirect the standard output to mod-active to update the active file: cat test | docheckgroups -u | mod-active That's all! Now, suppose we run: cat test | docheckgroups "^c..*$" Nothing is output (indeed, everything is fine for the c.* hierarchy). It would have been similar if the test file had only contained the checkgroups for the c.* hierarchy (docheckgroups would not have checked a.* and b.*, even if they had been in include-pattern). In order to check both a.* and c.*, you can run: cat test | docheckgroups "^a..*$|^c..*$" And if you want to check a.* but not a.second.*, you can run: cat test | docheckgroups "^a..*$" "^a.second..*$" In our example, docheckgroups will then mention a.second.announce and a.second.group for removal since they are in the active file (the same goes for their descriptions). Notwithstanding, if you do want to keep a.second.announce, just add this group to localgroups and docheckgroups will no longer mention it for removal. FILES
pathbin/docheckgroups The Shell script itself used to process checkgroups. pathetc/localgroups The list of local newsgroups along with their descriptions. HISTORY
Documentation written by Julien Elie for InterNetNews. $Id: docheckgroups.pod 8357 2009-02-27 17:56:00Z iulius $ SEE ALSO
active(5), controlchan(8), ctlinnd(8), mod-active(8), newsgroups(5). INN 2.5.2 2009-05-21 DOCHECKGROUPS(8)
All times are GMT -4. The time now is 05:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy