Sponsored Content
Top Forums Shell Programming and Scripting Bash for loop with arrays second variable? Post 302913911 by in2nix4life on Wednesday 20th of August 2014 04:16:32 PM
Old 08-20-2014
Occam's Razor....

The simplest answer is usually the right one...Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash and ksh: variable lost in loop in bash?

Hi, I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh). The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies

2. Shell Programming and Scripting

does bash have arrays that i can push into and run a for loop against?

Hi I have a bash script where i need to push some values into an array and when finished, run a for loop against that array for example myfile sausages|meat beef| meat carrot| veg ... ... for LINE in `cat myfile`; do FOOD=`echo $LINE | cut -d\| -f1` TYPE=`echo $LINE | cut... (4 Replies)
Discussion started by: rethink
4 Replies

3. Shell Programming and Scripting

(BASH) Using a loop variable to grep something in a file?

Hi, I have a loop running until a variable L that is read previously in the full script. I'd like to grep some information in an input file at a line that contains the value of the loop parameter $i. I've tried to use grep, but the problem is nothing is written in the FILE files. It seems grep... (5 Replies)
Discussion started by: DMini
5 Replies

4. UNIX for Dummies Questions & Answers

Help with 3 variable bash loop

Hi all! I think someone might be able to solve my problem pretty easily. I am trying to run a bash loop with 3 variables. I know how to do: for var1 in `cat list1`; do for var2 in `cat list2`; do for var3 in `cat list3`; command var1 var2 > var3; done; done; done However, this will run all... (4 Replies)
Discussion started by: torchij
4 Replies

5. Shell Programming and Scripting

Detail on For loop for multiple file input and bash variable usage

Dear mentors, I just need little explanation regarding for loop to give input to awk script for file in `ls *.txt |sort -t"_" -k2n,2`; do awk script $file done which sorts file in order, and will input one after another file in order to awk script suppose if I have to input 2 or... (4 Replies)
Discussion started by: Akshay Hegde
4 Replies

6. Programming

Global variable in for loop (BASH)

Hello, I'm trying to read the variable "pause" from a for loop without luck. The function is dependant on the outcome of the test within the loop. If i run this, pause is always 0 within the function. Any ideas? Thanks. pause=0 users=1 (for (( ; ; )) do speed=`cat speed.log` ... (7 Replies)
Discussion started by: shadyuk
7 Replies

7. Shell Programming and Scripting

Multiple arrays in variable using for loop

Hi, I'm trying to get the number of files inside same kind of folders on each disks and assigning each values in to a variable named with same folder and disk name so that it'll be easy for me to identify each time.But somehow I'm not able to assign those values in that specific name variable... (1 Reply)
Discussion started by: ratheeshp
1 Replies

8. Shell Programming and Scripting

Bash variable available for use outside loop

In the below for loop, I extract a variable $d which is an id that will change each time. The bash executes the problem that I am having is that p (after the done) is the path with the extracted $d. However, I can not use it in subsequent loops as it is not reconized. I have been trying to change... (3 Replies)
Discussion started by: cmccabe
3 Replies

9. UNIX for Beginners Questions & Answers

How do I assign the output of a command to a variable within a loop in bash?

In the else of the main if condition . else set lnk = $(readlink -f <path> | cut -d '/' -f7) echo "$lnk" if ] When I run the above on command line , the execution seems to be fine and I get the desired output. But when I try to assign it to a variable within a loop... (12 Replies)
Discussion started by: sankasu
12 Replies

10. UNIX for Beginners Questions & Answers

Bash Variable scope - while loop while reading from a file

Cope sample1: test.sh i=0 echo " Outside loop i = $i " while do i=$(( $i + 1)) echo "Inside loop i = $i " done echo " Out of loop i is : $i " When run output : Outside loop i = 0 Inside loop i = 1 Inside loop i = 2 Inside loop i = 3 Inside loop i = 4 Inside loop i = 5 Inside... (8 Replies)
Discussion started by: Adarshreddy01
8 Replies
RAZOR-AGENT.CONF(1)					User Contributed Perl Documentation				       RAZOR-AGENT.CONF(1)

NAME
"razor-agent.conf" - Configuration file for Razor Agents DESCRIPTION
"razor-agent.conf" is a configuration file read by the razor agents, which include razor-check(1), razor-admin(1), razor-report(1), and razor-revoke(1). The format is "attribute = value" pairs, one pair per line. Lines that begin with `#' are treated as comments. ATTRIBUTES
Following attributes can be specified: razorhome Directory where Razor Agents look for files. All files in "razor-agent.conf" without a full path will be relative to "razorhome". The default is "/etc/razor/" for root, and "~/.razor/" for every other user. If "razorhome" does not exist, it will be created. logfile Log file for the Razor Agents. The default is "razor-agent.log". debuglevel Controls the amount of messages written to logfile. It is an integer between 0 and 20. For Example, a value of 1 logs only startup and error messages, 5 includes every transaction with the server, and 14 is extremely verbose information intended for debugging use only. NOTE: 15 and higher create debug files on your filesystem -- do not use unless you know what you are doing. The default is 5. identity Specify an identify file to use for storing a newly registered identity during razor-admin(1). For razor-report(1) and razor-revoke(1), use this identity when authenticating with Razor Servers. If not specified, "<razorhome>/identity-<user>" is used. listfile_nomination File where Razor Nomination Servers are listed, in order of closest TCP ping time. Nomination Servers are used by razor-report(1) and razor-revoke(1). This file is created automatically. The default is "servers.nomination.lst". listfile_catalogue File where Razor Catalogue Servers are listed, in order of closest TCP ping time. Catalogue Servers are used by razor-check(1). This file is created automatically. The default is "servers.catalogue.lst". listfile_discovery File where Razor Discovery Servers are listed, in random order. This file is created automatically using DNS. The default is "servers.discovery.lst". rediscovery_wait_dns Max time in seconds Razor Agents will wait before computing a new "listfile_discovery" using DNS. The default is 604800, which is 7 days. rediscovery_wait Max time in seconds Razor Agents will wait before computing a new "listfile_nomination" and a new "listfile_catalogue". The default is 172800, which is 2 days. turn_off_discovery Turns off closest host discovery. When set to 1, "listfile_catalogue" and "listfile_nomination" will not be updated and "listfile_discovery" is not read or updated. The default is 0. ignorelist Automatically ignore mailing list posts. If set to 0, mailing list posts will be handled like all other mail. The default is 0. whitelist Name of whitelist file. Razor Agents can consult a whitelist of addresses and SHA1 hashes before checking a mail with Razor Servers. If the address/hash is found on the whitelist, the mail is marked `not spam', without checking against the server. The format of the whitelist can be found in razor-whitelist(5) manpage. The default is "razor-whitelist". min_cf When checking spam, the server optionally returns a spam confidence value ranging from 0 (not confident) to 100 (absolutely or 100% confident). To be considered spam, the server's spam confidence value must be greater than or equal to "min_cf". "min_cf" can be a number or an expression containing ac, the average confidence published by a Razor Server. Examples: 0, 60, 100, ac, ac + 10, ac - 20. If an expression evaluates to less than 0 it becomes 0, likewise those greater than 100 become 100. The default is "ac". report_headers When reporting spam, the entire email (headers and body) is sent to a Razor Nomination Server. When set to 0, all the headers are removed except headers beginning with "Content-" before sending, and a special header beginning with "X-Razor2" is added to note this action. The default is 1. AUTHORS
Vipul Ved Prakash, <mail@vipul.net> and Chad Norwood <chad@samo.org> SEE ALSO
razor-agents(1), razor-check(1), razor-admin(1), razor-report(1), razor-revoke(1), razor-whitelist(5) perl v5.12.1 2005-06-10 RAZOR-AGENT.CONF(1)
All times are GMT -4. The time now is 10:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy