Hello,
Can I ask how to expand variable that contains another in bash? I need to loop variable within another one like this:
I do not want use array as for i in testgrp testgroup testgroupfile tstgroup try2013 as the list is too long.
Thanks a lot!
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
shorewall6-exclusion
SHOREWALL6-EXCLUSIO(5) [FIXME: manual] SHOREWALL6-EXCLUSIO(5)NAME
exclusion - Exclude a set of hosts from a definition in a shorewall6 configuration file.
SYNOPSIS
!address-or-range[,address-or-range]...
!zone-name[,zone-name]...
DESCRIPTION
Exclusion is used when you wish to exclude one or more addresses from a definition. An exclaimation point is followed by a comma-separated
list of addresses. The addresses may be single host addresses (e.g., fe80::2a0:ccff:fedb:31c4) or they may be network addresses in CIDR
format (e.g., fe80::2a0:ccff:fedb:31c4/64). If your kernel and ip6tables include iprange support, you may also specify ranges of ip
addresses of the form lowaddress-highaddress
No embedded whitespace is allowed.
Exclusion can appear after a list of addresses and/or address ranges. In that case, the final list of address is formed by taking the first
list and then removing the addresses defined in the exclusion.
Beginning in Shorewall 4.4.13, the second form of exclusion is allowed after all and any in the SOURCE and DEST columns of
/etc/shorewall/rules. It allows you to omit arbitrary zones from the list generated by those key words.
Warning
If you omit a sub-zone and there is an explicit or explicit CONTINUE policy, a connection to/from that zone can still be matched by the
rule generated for a parent zone.
For example:
/etc/shorewall6/zones:
#ZONE TYPE
z1 ip
z2:z1 ip
...
/etc/shorewall6/policy:
#SOURCE DEST POLICY
z1 net CONTINUE
z2 net REJECT
/etc/shorewall6/rules:
#ACTION SOURCE DEST PROTO DEST
# PORT(S)
ACCEPT all!z2 net tcp 22
In this case, SSH connections from z2 to net will be accepted by the generated z1 to net ACCEPT rule.
FILES
/etc/shorewall6/hosts
/etc/shorewall6/masq
/etc/shorewall6/rules
/etc/shorewall6/tcrules
SEE ALSO shorewall6(8), shorewall6-accounting(5), shorewall6-actions(5), shorewall6-blacklist(5), shorewall6-hosts(5), shorewall6-interfaces(5),
shorewall6-maclist(5), shoewall6-netmap(5),shorewall6-params(5), shorewall6-policy(5), shorewall6-providers(5), shorewall6-rtrules(5),
shorewall6-routestopped(5), shorewall6-rules(5), shorewall6.conf(5), shorewall6-secmarks(5), shorewall6-tcclasses(5),
shorewall6-tcdevices(5), shorewall6-tcrules(5), shorewall6-tos(5), shorewall6-tunnels(5), shorewall-zones(5)
[FIXME: source] 06/28/2012 SHOREWALL6-EXCLUSIO(5)