Hi All,
I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl
FROM_DATE="06/05/2008"
TO_DATE="07/05/2008"
"perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename"
filename has... (10 Replies)
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)
Just started BASH scripting, and I tried to make a script 'args' to display all of the arguments that I give to it.
#!/bin/bash
if
then
echo "No arguments specified."
fi
val=
for ((i=1; i <= $# ; i++))
do
eval "\$val=\$$i"
echo "Argument number $i is $var."
done
However... (3 Replies)
Hello all,
I'm working on a script, and as part of it, I'm trying to create a loop that will run through a stored piece of information a certain number of times pulling out information, and each time create a variable with a unique name that will store that information. I'm sure it's a simple... (3 Replies)
Hello all,
I have this shell script, but do not understand why the variables inside the if block does not keep its value outside. Is it because of the pipe ? How can i fix this problem ?
Thank you for helping.
local alarm=""
local num_alarm=0
local -a alarms
... (3 Replies)
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Hello,
I am struggling with using variable made using "eval".
a=4
eval b$a=20
echo $b$a ???
As shown above, I am trying to call back the variable "bX" assuming I do not know the value of "a".
How can I do that?
I tried several combinations but nothing worked.
Thanks (10 Replies)
#aa=xxxx
#zz="cc $aa"
#aa=gggg
#echo $zz
out put is
cc xxxx
if I want to get
cc gggg
how should I do, I don't want to write zz="c $aa " after aa=gggg (2 Replies)
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
LEARN ABOUT DEBIAN
shorewall-rtrules
SHOREWALL-RTRULES(5) [FIXME: manual] SHOREWALL-RTRULES(5)NAME
rtrules - Shorewall Routing Rules file
SYNOPSIS
/etc/shorewall/rtrules
DESCRIPTION
Entries in this file cause traffic to be routed to one of the providers listed in shorewall-providers[1](5).
The columns in the file are as follows.
SOURCE (Optional) - {-|[&]interface|address|interface:address}
An ip address (network or host) that matches the source IP address in a packet. May also be specified as an interface name optionally
followed by ":" and an address. If the device lo is specified, the packet must originate from the firewall itself.
Beginning with Shorewall 4.5.0, you may specify &interface in this column to indicate that the source is the primary IP address of the
named interface.
DEST (Optional) - {-|address}
An ip address (network or host) that matches the destination IP address in a packet.
If you choose to omit either SOURCE or DEST, place "-" in that column. Note that you may not omit both SOURCE and DEST.
PROVIDER - {provider-name|provider-number|main}
The provider to route the traffic through. May be expressed either as the provider name or the provider number. May also be main or 254
for the main routing table. This can be used in combination with VPN tunnels, see example 2 below.
PRIORITY - priority
The rule's numeric priority which determines the order in which the rules are processed. Rules with equal priority are applied in the
order in which they appear in the file.
1000-1999
Before Shorewall-generated 'MARK' rules
11000-11999
After 'MARK' rules but before Shorewall-generated rules for ISP interfaces.
26000-26999
After ISP interface rules but before 'default' rule.
MARK - {-|mark[/mask]}
Optional -- added in Shorewall 4.4.25. For this rule to be applied to a packet, the packet's mark value must match the mark when
logically anded with the mask. If a mask is not supplied, Shorewall supplies a suitable provider mask.
EXAMPLES
Example 1:
You want all traffic coming in on eth1 to be routed to the ISP1 provider.
#SOURCE DEST PROVIDER PRIORITY MASK
eth1 - ISP1 1000
Example 2:
You use OpenVPN (routed setup /tunX) in combination with multiple providers. In this case you have to set up a rule to ensure that the
OpenVPN traffic is routed back through the tunX interface(s) rather than through any of the providers. 10.8.0.0/24 is the subnet chosen
in your OpenVPN configuration (server 10.8.0.0 255.255.255.0).
#SOURCE DEST PROVIDER PRIORITY MASK
- 10.8.0.0/24 main 1000
FILES
/etc/shorewall/rtrules
SEE ALSO
http://shorewall.net/MultiISP.html
http://shorewall.net/configuration_file_basics.htm#Pairs
shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5),
shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5),
shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5),
shorewall-zones(5)NOTES
1. shorewall-providers
http://www.shorewall.net/manpages/shorewall-providers.html
[FIXME: source] 06/28/2012 SHOREWALL-RTRULES(5)