Sponsored Content
Top Forums Shell Programming and Scripting how to check if masked directory exists? Post 302119573 by porter on Wednesday 30th of May 2007 08:26:27 PM
Old 05-30-2007
If you get back "AWP.????????.IP" then nothing matched the expression.

The way general expressions work in the shell is if there are file matches those that match are returned, else the expression.

Can you do "ls -l" for us to see what you are seeing?

It might be a case sensitivity type thing, note, windows file systems are case-insensitive, UNIX ones are normally case-sensitive.

You might need to try "awp.????????.ip" or some variation.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check if directory exists

Hi, I need to prompt for a response from a user to enter a path read dest_dir?"Please Enter Directory :" How do I do this until a valid directory is entered by the user. I can use to check the existence of the directory. However when I try the following I cannot get it to work. while ... (2 Replies)
Discussion started by: jerardfjay
2 Replies

2. UNIX for Dummies Questions & Answers

How can I check if directory exists in a makefile

Hi. I what to write a make file that inside a target I want to check if a directory exists. some like: ### make a: if ;then <command 1> else <command 2> fi ### make end Thanks a lot ---------------------- (2 Replies)
Discussion started by: zivsegal
2 Replies

3. Shell Programming and Scripting

my scripts does not check if directory exists

Hello: Can someone please help me figure out what is wrong here, my script does not move on to the "else" part even though there is no .ssh directory on my remote server: $more putkey.sh #!/bin/ksh for server in `cat list` do if ; then cat $HOME/.ssh/id_rsa.pub |ssh $server ' cat >>... (4 Replies)
Discussion started by: Sara-sh
4 Replies

4. Shell Programming and Scripting

check if a directory exists if not make it

Hey guys im trying to check if the directory exists i get a syntax error on the elif statement iv tried using else and still same result im not sure. If the directory does not exist can i just insert mkdir /tmp/old under the elif once that part gets working if ; then #do nothing elif echo... (20 Replies)
Discussion started by: musicmancanora
20 Replies

5. Shell Programming and Scripting

check if directory and file exists

cp $PATHLOGS/$DATE/*.* $TMP/logs_tmp/ cp $PATHLOGS/$DATE1/*.* $TMP/logs_tmp/ Before copying the files I have to check if the directory $DATE1 and $DATE2 exists. If directory exists then, check if the folder contains some files. if the file exists then, check if the file size is greater... (3 Replies)
Discussion started by: sandy1028
3 Replies

6. Shell Programming and Scripting

How to check if a file exists in a directory?

I want to perform SQL *Loader operation only if a file named "load.txt" exists in a directory "/home/loc/etc". Please help how to check this with a if condition. (8 Replies)
Discussion started by: vel4ever
8 Replies

7. Shell Programming and Scripting

how to check if a directory exists or not.if not need to create it

Hi, I am using solaris 10 OS and bash shell.just checking for small code snippet which follows below. /export/home/vomappservers/spa/common/5.0 /export/home/vomappservers/spa/common/scripts /export/home/vomappservers/spa/tools /export/home/vomappservers/spa/scm5.0/SCCS... (5 Replies)
Discussion started by: muraliinfy04
5 Replies

8. Shell Programming and Scripting

How to check if the file exists in directory?

Hi Gurus, I have a requests to find if all the file in the filelist exist in certain directory. example: my filelist abc def ddd cde afg how can I find these 5 files exists at director /home/abc Thanks in advance (7 Replies)
Discussion started by: ken6503
7 Replies

9. Shell Programming and Scripting

Check whether file exists in directory

Hi guys, I am beginner trying to learn unix. So any help is welcomed. My requirement is to check whether is a file exists in a particular directory or not. The directory path and filename are taken dynamically with user interaction. So the program should continue only if the $filename... (1 Reply)
Discussion started by: maris_markur
1 Replies

10. UNIX for Beginners Questions & Answers

Check that at least one file exists in the directory.

There are some files with suffix dates like abc_20032019.dat abc_17032019.dat If at least one file exists then perform some operation else exit from execution. Korn shell ---------------------------------- array=($inputdir/abc*.dat) If ] ] then echo " file exits" else echo " file does... (10 Replies)
Discussion started by: Rajesh123
10 Replies
Mail::SpamAssassin::Plugin::AWL(3)			User Contributed Perl Documentation			Mail::SpamAssassin::Plugin::AWL(3)

NAME
Mail::SpamAssassin::Plugin::AWL - Normalize scores via auto-whitelist SYNOPSIS
To try this out, add this or uncomment this line in init.pre: loadplugin Mail::SpamAssassin::Plugin::AWL Use the supplied 60_awl.cf file (ie you don't have to do anything) or add these lines to a .cf file: header AWL eval:check_from_in_auto_whitelist() describe AWL From: address is in the auto white-list tflags AWL userconf noautolearn priority AWL 1000 DESCRIPTION
This plugin module provides support for the auto-whitelist. It keeps track of the average SpamAssassin score for senders. Senders are tracked using a combination of their From: address and their IP address. It then uses that average score to reduce the variability in scoring from message to message and modifies the final score by pushing the result towards the historical average. This improves the accuracy of filtering for most email. TEMPLATE TAGS
This plugin module adds the following "tags" that can be used as placeholders in certain options. See "Mail::SpamAssassin::Conf" for more information on TEMPLATE TAGS. _AWL_ AWL modifier _AWLMEAN_ Mean score on which AWL modification is based _AWLCOUNT_ Number of messages on which AWL modification is based _AWLPRESCORE_ Score before AWL USER PREFERENCES
The following options can be used in both site-wide ("local.cf") and user-specific ("user_prefs") configuration files to customize how SpamAssassin handles incoming email messages. use_auto_whitelist ( 0 | 1 ) (default: 1) Whether to use auto-whitelists. Auto-whitelists track the long-term average score for each sender and then shift the score of new messages toward that long-term average. This can increase or decrease the score for messages, depending on the long-term behavior of the particular correspondent. For more information about the auto-whitelist system, please look at the the "Automatic Whitelist System" section of the README file. The auto-whitelist is not intended as a general-purpose replacement for static whitelist entries added to your config files. Note that certain tests are ignored when determining the final message score: - rules with tflags set to 'noautolearn' auto_whitelist_factor n (default: 0.5, range [0..1]) How much towards the long-term mean for the sender to regress a message. Basically, the algorithm is to track the long-term mean score of messages for the sender ("mean"), and then once we have otherwise fully calculated the score for this message ("score"), we calculate the final score for the message as: "finalscore" = "score" + ("mean" - "score") * "factor" So if "factor" = 0.5, then we'll move to half way between the calculated score and the mean. If "factor" = 0.3, then we'll move about 1/3 of the way from the score toward the mean. "factor" = 1 means just use the long-term mean; "factor" = 0 mean just use the calculated score. auto_whitelist_ipv4_mask_len n (default: 16, range [0..32]) The AWL database keeps only the specified number of most-significant bits of an IPv4 address in its fields, so that different individual IP addresses within a subnet belonging to the same owner are managed under a single database record. As we have no information available on the allocated address ranges of senders, this CIDR mask length is only an approximation. The default is 16 bits, corresponding to a former class B. Increase the number if a finer granularity is desired, e.g. to 24 (class C) or 32. A value 0 is allowed but is not particularly useful, as it would treat the whole internet as a single organization. The number need not be a multiple of 8, any split is allowed. auto_whitelist_ipv6_mask_len n (default: 48, range [0..128]) The AWL database keeps only the specified number of most-significant bits of an IPv6 address in its fields, so that different individual IP addresses within a subnet belonging to the same owner are managed under a single database record. As we have no information available on the allocated address ranges of senders, this CIDR mask length is only an approximation. The default is 48 bits, corresponding to an address range commonly allocated to individual (smaller) organizations. Increase the number for a finer granularity, e.g. to 64 or 96 or 128, or decrease for wider ranges, e.g. 32. A value 0 is allowed but is not particularly useful, as it would treat the whole internet as a single organization. The number need not be a multiple of 4, any split is allowed. user_awl_sql_override_username Used by the SQLBasedAddrList storage implementation. If this option is set the SQLBasedAddrList module will override the set username with the value given. This can be useful for implementing global or group based auto-whitelist databases. auto_whitelist_distinguish_signed Used by the SQLBasedAddrList storage implementation. If this option is set the SQLBasedAddrList module will keep separate database entries for DKIM-validated e-mail addresses and for non- validated ones. A pre-requisite when setting this option is that a field awl.signedby exists in a SQL table, otherwise SQL operations will fail (which is why we need this option at all - for compatibility with pre-3.3.0 database schema). A plugin DKIM should also be enabled, as otherwise there is no benefit from turning on this option. ADMINISTRATOR SETTINGS
These settings differ from the ones above, in that they are considered 'more privileged' -- even more than the ones in the PRIVILEGED SETTINGS section. No matter what "allow_user_rules" is set to, these can never be set from a user's "user_prefs" file. auto_whitelist_factory module (default: Mail::SpamAssassin::DBBasedAddrList) Select alternative whitelist factory module. auto_whitelist_path /path/filename (default: ~/.spamassassin/auto-whitelist) This is the automatic-whitelist directory and filename. By default, each user has their own whitelist database in their "~/.spamassassin" directory with mode 0700. For system-wide SpamAssassin use, you may want to share this across all users, although that is not recommended. auto_whitelist_db_modules Module ... (default: see below) What database modules should be used for the auto-whitelist storage database file. The first named module that can be loaded from the perl include path will be used. The format is: PreferredModuleName SecondBest ThirdBest ... ie. a space-separated list of perl module names. The default is: DB_File GDBM_File SDBM_File NDBM_File is no longer supported, since it appears to have bugs that preclude its use for the AWL (see SpamAssassin bug 4353). auto_whitelist_file_mode (default: 0700) The file mode bits used for the automatic-whitelist directory or file. Make sure you specify this using the 'x' mode bits set, as it may also be used to create directories. However, if a file is created, the resulting file will not have any execute bits set (the umask is set to 111). user_awl_dsn DBI:databasetype:databasename:hostname:port Used by the SQLBasedAddrList storage implementation. This will set the DSN used to connect. Example: "DBI:mysql:spamassassin:localhost" user_awl_sql_username username Used by the SQLBasedAddrList storage implementation. The authorized username to connect to the above DSN. user_awl_sql_password password Used by the SQLBasedAddrList storage implementation. The password for the database username, for the above DSN. user_awl_sql_table tablename Used by the SQLBasedAddrList storage implementation. The table user auto-whitelists are stored in, for the above DSN. perl v5.16.3 2011-06-06 Mail::SpamAssassin::Plugin::AWL(3)
All times are GMT -4. The time now is 05:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy