Sponsored Content
Top Forums Shell Programming and Scripting adding a list of numbers 3 by 3 Post 302321724 by Tártaro on Tuesday 2nd of June 2009 02:29:40 AM
Old 06-02-2009
Thanks everybody; i got it.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding 2 numbers

I would like to write a script with BASH to add two numbers (integer) and write the result to the standard output. Please help! (7 Replies)
Discussion started by: Viper01
7 Replies

2. UNIX for Dummies Questions & Answers

adding hundreds of numbers

i know how to add two numbers using expr, but if i have a file with hundreds of numbers, how do i add them all together, without typing them all one by one? for example, file.txt contains 4 5 6 7 how can i give a command to add them, without typing $ expr `4 + 5 + 6 + 7` (7 Replies)
Discussion started by: FOBoy
7 Replies

3. UNIX for Dummies Questions & Answers

Adding numbers in unix

Hi this is quite a simple question... I am new to LINUX/UNIX and so I am just trying to create a very basic program. The idea is that when the user runs the program (from the shell) they enter 3 values and the program will add them up: "./sum 23 5 1 29" my code for this program is as follows: ... (4 Replies)
Discussion started by: csuieb
4 Replies

4. Shell Programming and Scripting

Adding numbers

Hi I figured how to add my list of numbers. However how do I count so that after a certain number it lists the line. Example: 12 test1 46 test2 195 test3 174 test4 634 test5 185 test6 94 test7 So basically add the numbers and when the addition reaches 300 or less print the... (8 Replies)
Discussion started by: bombcan
8 Replies

5. Shell Programming and Scripting

Adding numbers in a string

I am writing a bash script on ubuntu11.10 I have some string having numbers and letter and want to add all the numbers together For example 1s2d23f I want to perform 1 + 2 + 23 and store it in a variable (3 Replies)
Discussion started by: kristinu
3 Replies

6. Shell Programming and Scripting

help with adding up numbers

I have a file which has following contents which I want to add up. 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 28170.24 139038.72 139038.72 139038.72 139038.72 (5 Replies)
Discussion started by: aksijain
5 Replies

7. UNIX for Dummies Questions & Answers

Adding Column Of Numbers

Hello. Trying to add a column of numbers and combine the 1st and 2nd fields as uniq with the new total. This works to add the numbers but can't figure an easy was to combine the 1st and 2nd column as the list is very long. awk '{s+=$3} END {print s}' bird dog 300 bird dog 100 cat clown 200... (1 Reply)
Discussion started by: jimmyf
1 Replies

8. Shell Programming and Scripting

Adding Long List Of Large Numbers

Hi All, I have a file with long list of numbers. This file contains only one column. These numbers are very large. I am using following command: cat myfile.txt | awk '{ sum+=$1} END {print sum}' The output is coming in scientific notation. How do I get the result in proper format? ... (4 Replies)
Discussion started by: angshuman
4 Replies

9. Shell Programming and Scripting

Adding (as in arithmetic) to numbers in columns in file, and writing new file with new numbers

Hi again. Sorry for all the questions — I've tried to do all this myself but I'm just not good enough yet, and the help I've received so far from bartus11 has been absolutely invaluable. Hopefully this will be the last bit of file manipulation I need to do. I have a file which is formatted as... (4 Replies)
Discussion started by: crunchgargoyle
4 Replies

10. Shell Programming and Scripting

Adding the squence numbers

Hi All, Could you please help me on this requirement. File data: A A A B B B i need the output like A1 A2 A3 B1 (3 Replies)
Discussion started by: bmk123
3 Replies
rblsmtpd(1)						      General Commands Manual						       rblsmtpd(1)

NAME
rblsmtpd - blocks mail from RBL-listed sites. It works with any SMTP server that can run under tcpserver(1) SYNOPSIS
rblsmtpd opts prog DESCRIPTION
opts is a series of getopt-style options. prog consists of one or more arguments. Normally rblsmtpd runs prog. prog is expected to carry out an SMTP conversation to receive incoming mail messages. However, rblsmtpd does not invoke prog if it is told to block mail from this client. Instead it carries out its own limited SMTP conversa- tion, temporarily rejecting all attempts to send a message. Meanwhile it prints one line on descriptor 2 to log its activity. rblsmtpd drops the limited SMTP conversation after 60 seconds, even if the client has not quit by then. OPTIONS
-t n Change the timeout to n seconds. Blocked clients If the $RBLSMTPD environment variable is set and is nonempty, rblsmtpd blocks mail. It uses $RBLSMTPD as an error message for the client. Normally rblsmtpd runs under tcpserver(1); you can use tcprules(1) to set $RBLSMTPD for selected clients. If $RBLSMTPD is set and is empty, rblsmtpd does not block mail. If $RBLSMTPD is not set, rblsmtpd looks up $TCPREMOTEIP in the RBL, and blocks mail if $TCPREMOTEIP is listed. tcpserver sets up $TCPRE- MOTEIP as the IP address of the remote host. -r base Use base as an RBL source. An IP address a.b.c.d is listed by that source if d.c.b.a.base has a TXT record. rblsmtpd uses the con- tents of the TXT record as an error message for the client. -a base Use base as an anti-RBL source. An IP address a.b.c.d is anti-listed by that source if d.c.b.a.base has an A record. In this case rblsmtpd does not block mail. You may supply any number of -r and -a options. rblsmtpd tries each source in turn until it finds one that lists or anti-lists $TCPRE- MOTEIP. It also tries an RBL source of rbl.maps.vix.com if you do not supply any -r options. See http://maps.vix.com/rbl/ for more informa- tion about rbl.maps.vix.com. If you want to run your own RBL source or anti-RBL source for rblsmtpd, you can use rbldns from the DNScache (djbdns) package. Temporary errors Normally, if $RBLSMTPD is set, rblsmtpd uses a 451 error code in its limited SMTP conversation. This tells legitimate clients to try again later. It gives innocent relay operators a chance to see the problem, prohibit relaying, get off the RBL, and get the mail delivered. However, if $RBLSMTPD begins with a hyphen, rblsmtpd removes the hyphen and uses a 553 error code. This tells legitimate clients to bounce the message immediately. There are several error-handling options for RBL lookups: -B (Default.) Use a 451 error code for IP addresses listed in the RBL. -b Use a 553 error code for IP addresses listed in the RBL. -C (Default.) Handle RBL lookups in a ``fail-open'' mode. If an RBL lookup fails temporarily, assume that the address is not listed; if an anti-RBL lookup fails temporarily, assume that the address is anti-listed. Unfortunately, a knowledgeable attacker can force an RBL lookup or an anti-RBL lookup to fail temporarily, so that his mail is not blocked. -c Handle RBL lookups in a ``fail-closed'' mode. If an RBL lookup fails temporarily, assume that the address is listed (but use a 451 error code even with -b). If an anti-RBL lookup fails temporarily, assume that the address is not anti-listed (but use a 451 error code even if a subsequent RBL lookup succeeds with -b). Unfortunately, this sometimes delays legitimate mail. SEE ALSO
tcpserver(1), tcprules(1), tcprulescheck(1), fixcrio(1), recordio(1), rblsmtpd(1), tcpclient(1), who@(1), date@(1), finger@(1), http@(1), tcpcat(1), mconnect(1), tcp-environ(5) http://cr.yp.to/ucspi-tcp.html rblsmtpd(1)
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy