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 DEBIAN
racoon-tool
RACOON-TOOL(8) System Manager's Manual RACOON-TOOL(8)
NAME
racoon-tool - program to manage the racoon(8) IPSEC IKE daemon.
SYNOPSIS
racoon-tool [-h] reload|restart|force-reload|start|stop
racoon-tool [-h] sadflush|spdflush|saddump|spddump
racoon-tool [-h] vpndown|vdown|vpnup|vup connection-name|all
racoon-tool [-h] vpnreload|vreload connection-name|all
racoon-tool [-h] vpnlist|vlist [connection-name|all]
racoon-tool [-h] vpnmenu|vmenu [connection-name-regexp]
racoon-tool [-h] racoonstart|racoonstop|rstart|rstop
DESCRIPTION
This manual page documents briefly the racoon-tool command. racoon-tool(8) is a perl script that can be used to control the racoon(8) IKE
daemon and the SPD database within the kernel via the setkey(8) command. Various operations that it can do are described below.
You can also optionally choose not to use it via reconfiguring the racoon package using dpkg-reconfigure(8).
OPTIONS
A summary of options are included below.
-h Show summary of options.
COMMANDS
start Start racoon(8), loading any needed modules, configuring the SPD, and generating a configuration from /etc/racoon/racoon-tool.conf
(head) and following up with *.conf files from /etc/racoon/racoon-tool.conf.d/.
stop Stop racoon(8) unloading any crypto/IPSEC modules, flushing the SAD and SPD.
reload Regenerate configuration from /etc/racoon/racoon.conf, and /etc/racoon/racoon.conf.d/, HUP racoon(8) and reinitialise the SPD and
SAD.
restart|force-reload
Perform a stop followed by a start
sadflush
Flush the SAD via setkey(8).
spdflush
Flush the SPD via setkey(8).
saddump|dump
Dump the SAD to screen via setkey(8), paginating via your pager.
spddump
Dump the SPD to screen via setkey(8), paginating via your pager.
vpnup|vup connection-name|all
Bring up the VPN connection(s).
vpndown|vdown connection-name|all
Take down the VPN connection(s).
vpnreload|vreload connection-name|all
Reload the VPN connection(s).
vpnlist|vlist [connection-name|all]
List the known VPN connections in /etc/racoon/racoon-tool.conf, etc. Can be used by a script or administrator to see if a VPN con-
nection exists.
vpnmenu|vmenu [connection-name-regexp]
Start the VPN menu management mode. This displays the SPD, and you can shutdown VPNs from here. Latter on support will be added
for checking status and reloading the chosen connection.
racoonstart|rstart
Start only the racoon(8) daemon.
racoonstop|rstop
Stop only the racoon(8) daemon.
FILES
/etc/racoon/racoon-tool.conf
- configuration file (head).
/etc/racoon/racoon-tool.conf.d
- configuration file segment directory read after the above.
/var/lib/racoon/racoon.conf
- generated racoon.conf
SEE ALSO
racoon(8), racoon.conf(5), setkey(8), racoon-tool.conf(5).
AUTHOR
This manual page was written by Matthew Grant <matthewgrant5@gmail.com>, for the Debian GNU/Linux system (but may be used by others).
RACOON-TOOL(8)