Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] Why code run not correctly Post 302670579 by guruprasadpr on Thursday 12th of July 2012 08:24:21 AM
Old 07-12-2012
Hi

Its not just about spaces, its about the brackets as mentioned earlier. Try running the corrected code which i pasted, it works fine.

Guru
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run perl command in script[solved]

Hi all, When I put the Perl command in a script, I got error. system("perl -pi -e 's@words@words@g' myFile"); The error is: Unrecognized character \x8A; marked by <-- HERE after دت مد�<-- HERE near column 15 at -e line 1. Thanks in advance. ---------- Post updated at 06:30 AM... (0 Replies)
Discussion started by: Lham
0 Replies

2. Shell Programming and Scripting

run command with ssh[solved]

Hi all, Is it possible to make this possible ? $ echo $SKY_HOME /var/sink/SKY $ echo $SKY_HOME /home/smily/SKY $ ssh root@xyz "echo $SKY_HOME" root@xyz 's password: ****** /home/smily/SKY wrong output I was expecting the output as /var/sink/SKY (3 Replies)
Discussion started by: linuxadmin
3 Replies

3. Shell Programming and Scripting

run shell script under nohup directly [solved]

Hi, i am not able to run the loop in nohup directly. nohup 'for i in $(seq 10); do echo $i;./mscript.sh $i; done' can some one help me how to run this directly in nohup? ---------- Post updated 03-15-12 at 12:20 AM ---------- Previous update was 03-14-12 at 11:59 PM ---------- From... (0 Replies)
Discussion started by: johninweb
0 Replies

4. UNIX for Dummies Questions & Answers

[Solved] Cron - job to run every 3rd Friday of the month only

Hi Expert Please help me to set a cron job schedule, Ihave a job that run every 3rd Friday of the month at 1030am. I tried to set up like this, but the job still runs every friday at 1030am. I want the job to run every 3rd Friday of the month at 1030am only 30 10 15,16,17,18,19,20,21... (2 Replies)
Discussion started by: kaibiganmi
2 Replies

5. UNIX for Advanced & Expert Users

[SOLVED] Code does not run when assigned to a variable

I am more of a newbie, but wanted to post this in this forum as I was afraid no one would look at it in unix forums as it concerns shell scripting. I have a shell script that now runs fine with the exclusion of one line: x=`su nbadmin -c "ssh -t servery /usr/openv/netbackup/bin/bplist -C... (7 Replies)
Discussion started by: newbie2010
7 Replies

6. Shell Programming and Scripting

[Solved] Run multiple commands in invoked program

Hi, I have coded a program in Haskell using the compiler Hugs and the program requires multiple commands (with parameters) to be entered into it, it then outputs the result of its execution. I need to test a lot of different options (i.e. the parameters) so it would be obvious to automate the... (0 Replies)
Discussion started by: tz742
0 Replies

7. Homework & Coursework Questions

Cannot correctly connect multi-stage C command pipe (among others) (FYI: a lot of code)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: We are supposed to write a C program that parses a command line, separates it into each command (further... (5 Replies)
Discussion started by: kowit010
5 Replies

8. Shell Programming and Scripting

[Solved] Help understanding this code!!

Hi guys, I am still learning awk and much apprecated to shed some light on the following: the questions asked is below! { total = i = 0 do { ++i total += $i } while ( total <= 100 ) print i, ":", total } File used: cat test.do 45 25 60 20 10 105 50 40 33 5 9 67 108 3 5 4 (2 Replies)
Discussion started by: Apollo
2 Replies

9. UNIX for Beginners Questions & Answers

When I run the code yesterday I am getting output,when I run same code today I am getting error?

If run the below code today its creating all directory and getting output files,I f run same code tomorrow I am getting error. can any one give suggestion to sortout this error. OSError: no such file or directory : '062518'My code looks like this import paramiko import sys import os ... (8 Replies)
Discussion started by: haribabu2229
8 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 01:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy