11-27-2013
Help needed in case
Hi All,
I have a requirement to write shell script in which we have to test three cases considering ip connection which differentiate the tool's name as per as the ip address in the file.txt .
<ip1>,<ip2>,<ip3> address belongs to Tool1
<ip4>,<ip5>,<ip6> address belongs to Tool2
if ip <ip1>,<ip2>,<ip3> address in <file.txt> will send mail -- connection -- append from <tool1>
If <ip4>,<ip5>,<ip6> address in file.txt will send mail --connection --append from <tool2>
Also considering the case where connection are coming from both the tool at the same time ..script can differentiate according to the ip address.
Please advice here.Thanks in advance.!
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
Hi,
I have a script as below:
.......................................................................
rpttxt()
{
name="$*"
awk '/'"${name}"'/ {print $2$3$4 }' file_1.txt
}
title="`rpttxt "TITLE"`"
.........................................................................
The... (0 Replies)
Discussion started by: jisha
0 Replies
3. Shell Programming and Scripting
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Discussion started by: abhilash mn
1 Replies
4. Shell Programming and Scripting
Hi,
In below code, i am expecting the output has
Bye
Bye
But i am getting has
Bye
Hi
Code:
#!/usr/bin/bash
var="Hi"
cat txt.txt | while read var1
do
next="Bye"
case $var in
Hi) (1 Reply)
Discussion started by: Balamani
1 Replies
5. Shell Programming and Scripting
Hi Experts team,
i wish to use switch case in unix.
my req is
case $code in
1111)
echo "1111"
1112)
echo "1112"
*)
echo "default"
esac
see eventhough for particular case 1111 , it is always execute the default statement *), if i code like this.
How can handle... (2 Replies)
Discussion started by: spkandy
2 Replies
6. Shell Programming and Scripting
Hi all,
i have a data array as followes.
ARRAY=DFSG345GGG
ARRAY=234FDFG090
ARRAY=VDFVGBGHH
so on..........
i need all english letters to be change to lower case. So i am expecting to see
ARRAY=dfsg345ggg
ARRAY=234fdfg090
ARRAY=vdfvgbghh
so on........
If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies
7. Shell Programming and Scripting
Hi
I want to make string substitution ignoring case for search but respecting case for subtitute. Ex changing all occurences of "original" in a file to "substitute":
original becomes substitute
Origninal becomes Substitute
ORIGINAL becomes SUBSTITUTE
I know this a little special but it's not... (1 Reply)
Discussion started by: kmchen
1 Replies
8. Shell Programming and Scripting
Hello Unix Gurus :
It would be really appreciative if can find a solution for this .
I have records in a file .
I need to Capitalize the records based on condition .
For Example i tried the following Command
COMMAND -->
fgrep "2000YUYU" /export/home/oracle/TST/data.dat | tr '' ''... (12 Replies)
Discussion started by: tsbiju
12 Replies
9. Shell Programming and Scripting
Hi all,
I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like
. ; : ! ?I found the following command
sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies
LEARN ABOUT SUSE
exim_checkaccess
EXIM_CHECKACCESS(8) System Manager's Manual EXIM_CHECKACCESS(8)
NAME
exim_checkaccess - Check address acceptance from given IP
SYNOPSIS
exim_checkaccess IP-address email@address [more Exim options]
DESCRIPTION
Exim's -bh command line argument allows you to run a fake SMTP session with debugging output, in order to check what Exim is doing when it
is applying policy controls to incoming SMTP mail. However, not everybody is sufficiently familiar with the SMTP protocol to be able to
make full use of -bh, and sometimes you just want to answer the question "Does this address have access?" without bothering with any fur-
ther details.
The exim_checkaccess utility is a 'packaged' version of -bh. It takes two arguments, an IP address and an email address:
exim_checkaccess 10.9.8.7 A.User@a.domain.example
The utility runs a call to Exim with the -bh option, to test whether the given email address would be accepted in a RCPT command in a
TCP/IP connection from the host with the given IP address. The output of the utility is either the word 'accepted', or the SMTP error
response, for example:
Rejected:
550 Relay not permitted
When running this test, the utility uses "<>" as the envelope sender address for the MAIL command, but you can change this by providing
additional options. These are passed directly to the Exim command. For example, to specify that the test is to be run with the sender
address "himself@there.example" you can use:
exim_checkaccess 10.9.8.7 A.User@a.domain.example
-f himself@there.example
Note that these additional Exim command line items must be given after the two mandatory arguments.
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO
exim(8), /usr/share/doc/exim4-base/
AUTHOR
This manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system
(but may be used by others).
March 26, 2003 EXIM_CHECKACCESS(8)