Sponsored Content
Full Discussion: My script is not working
Top Forums Shell Programming and Scripting My script is not working Post 302994201 by Scrutinizer on Monday 20th of March 2017 10:42:07 AM
Old 03-20-2017
Moderator's Comments:
Mod Comment No matter how many times you open a new account after being banned, you will continue to be banned.

This thread is closed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script not working..."sort" not working properly....

Hello all, I have a file - 12.txt cat 12.txt =============================================== Number of executions = 2 Total execution time (sec.ms) = 0.009883 Number of executions = 8 Total execution time (sec.ms) = 0.001270 Number of... (23 Replies)
Discussion started by: Rahulpict
23 Replies

2. Shell Programming and Scripting

Perl script 'system' linking to local shell script not working

Trying to figure out why this works: printpwd.pl #!/usr/bin/perl use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; $A = system("pwd"); $A = `pwd`; print "$A\n"; ^^actually that works/breaks if that makes any sense.. i get the working directory twice but when... (5 Replies)
Discussion started by: phpfreak
5 Replies

3. Shell Programming and Scripting

HELP !! script not working..

Hi all, I have a piece of code which cork perfect. It copy the no of lines from some files (*.log) into finalLog file. It read the lines after the line have text "ntot". Here it is : #!/bin/bash ... (10 Replies)
Discussion started by: nrjrasaxena
10 Replies

4. Shell Programming and Scripting

Script is not working from cron while working manually

Hello, I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me 1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

5. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies

6. Shell Programming and Scripting

expect script inside shell script not working.

Shell Scipt: temp.sh su - <$username> expect pass.exp Expect script: pass.exp #!/usr/bin/expect -f # Login ####################### expect "Password: " send "<$password>\r" it comes up with Password: but doesnt take password passed throguh file. (2 Replies)
Discussion started by: bhavesh.sapra
2 Replies

7. UNIX for Dummies Questions & Answers

My script is not working

Hi All, I am trying to calculate the total_amount based on two key fields. Here is the script. I am new to unix. So please help me to find out the error in this script. I'm getting error like "command not found" and ]; is missing.. PRE_LBNO=0 PRE_DATE=0 TOT_PAY=0 for line in `cat... (4 Replies)
Discussion started by: lathanandhini
4 Replies

8. Shell Programming and Scripting

Script not working

Hi i have write the one scripts and the scripts is error. The scripts purpose select one directory to check the file is there or not. i will give the two format of file to search the mention the path one file is there to select the file one copy the another location.please check the my script give... (1 Reply)
Discussion started by: rajivgandhi
1 Replies

9. UNIX for Beginners Questions & Answers

Why is this script not working?

for file in $(find /home/p611568/*.rpt -mtime -2 | grep -v ftplog) do awk '$1 == "XifPages," {PAGE = $5} $1 == "XifEndOfDocuments," {LINE = $5} index($0,"Value") && index($1,"Info") {sevGTI = 1} END {if (sevGTI) printf "%7s%10s%s",PAGE,LINE ... (4 Replies)
Discussion started by: bcarosi
4 Replies

10. Shell Programming and Scripting

Help with speeding up my working script to take less time - how to use more CPU usage for a script

Hello experts, we have input files with 700K lines each (one generated for every hour). and we need to convert them as below and move them to another directory once. Sample INPUT:- # cat test1 1559205600000,8474,NormalizedPortInfo,PctDiscards,0.0,Interface,BG-CTA-AX1.test.com,Vl111... (7 Replies)
Discussion started by: prvnrk
7 Replies
dansguardian(3pm)					User Contributed Perl Documentation					 dansguardian(3pm)

NAME
Dansguardian - Simple module for administer dansguardian's control files. SYNOPSIS
use Dansguardian; # Make the objet $dg using the contructor new() my $dg = Dansguardian->new(dir => '/etc/dansguardian', group_dir => '/etc/dansguardian/lists'); # Save IP's banned in array my @banned_ips = $dg->get('bannediplist'); print "The IP address $_ is banned!! " foreach @banned_ips; # Add exception web site my $site = 'mogaal.com'; $dg->set(file => 'exceptionsitelist', add => $site, comment => "Is not porn site"); # Remove banned IP my $ip_free = '192.168.0.2'; $dg->remove(file => 'bannediplist', line => $ip_free); # list sites banned my @sites_banned = $dg->get('bannedsitelist'); print "The site $_ is banned!! " foreach @sites_banned; # list dansguardian's config directory and the current group directory print "Dansguardian's config directory is " . $dg->group() . " and " . $dg->dir() . " is the current group directory "; # Change group directory; $dg->group("/etc/dansguardian/chiefs"); print "Dansguardian's config directory is " . $dg->dir() . " and " . $dg->group() . " is the current group directory "; DESCRIPTION
"DansGuardian is an award winning Open Source web content filter which currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX, and Solaris. It filters the actual content of pages based on many methods including phrase matching, PICS filtering and URL filtering. It does not purely filter based on a banned list of sites like lesser totally commercial filters." Dansguardian Perl module is small module for administer dansguardian's content control files. It let you add, remove and get information from files control across methods. METHODS
Dansguardian perl module provides some basic methods for administer control files, with it you can add, remove and get information about IP's blocked, sites denies, IP exception and other information. new (constructor) $dg = Dansguardian->new([%attributes]) The constructor will create an object. It accepts a list of key => value pairs: dir => 'dansguardian/config/directory' If you don't set up a config directory for dansguardian the module will set up default value: /etc/dansguardian group_dir => 'path/to/group_dir/directory' Same that dir hash, and the default value is: /etc/dansguardian/lists $dg->group([$group_dir]); If group method don't have attribute: the function return array with dansguardian current group directory. Is possible change the group directory setting up $group_dir variable. $dg->dir([$config_dir]); If dir method don't have attribute: the function return array with dansguardian current config directory. Is possible change the group directory setting up $group_dir variable. $dg->set(%attributes); set method must have hash attributes. So, it accepts a list of key => value pairs: file => 'FILE' The FILE value is the file (locate inside current group dir) where you wish add information. For example: If you want add site to exception. $dg->set(file => 'exceptionsitelist', add => $site, comment => "Is not porn site"); This line will add $site to /etc/dansguardian/lists/exceptioniplist assuming that /etc/dansguardian/lists is current group directory add => 'INFORMATION' The 'add' value is the information to add in dansguardian control file. For example: If you need add one IP for bannediplist control file, then assign 'IP' value for add hash key. comment => 'OPTIONAL COMMENT' This key is optional but very usefull for reading control files. It add comment at final line, after the 'add' value. $dg->remove($file) remove method must have one hash attribute with keys: file => 'FILE' The FILE value is the file (locate inside current group dir) where you wish remove information. line => 'LINE/IP/SITE/whatever' The value of hash key line is the information for remove in dansguardian control file. For example: For remove IP address from bannediplist control file you must add 'IP' like value of line hash key. Example $dg->remove(file => 'bannediplist', line => '192.168.24.76'); $dg->get($file) Get method return an array data with information inside content control file. The incoming parameter is the control file name. Example: @ips_banned = $dg->get('bannediplist') print "The IP address $_ is banned!! " foreach @banned_ips; BUGS
The package don't have been bugs reported. If you find one notice me. AUTHOR
Alejandro Garrido Mota <garridomota@gmail.com>. COPYRIGHT AND LICENSE
Copyright (c) 2007 Alejandro Garrido Mota. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.0 2009-05-10 dansguardian(3pm)
All times are GMT -4. The time now is 08:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy