07-02-2004
With bash, you can use the following construct to use the contents of a variable as the name of another variable, doing in effect a double expansion:
${!systems}
If systems contains "systemA_list", then it will instead expand the value of $systemA_list. It sounds like you have to do something like this:
system=systemA
listname=${system}_list #put name of required variable in $listname
list=${!listname} # expand $listname twice, giving the value of $systemA_list
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
How can I use sed to perform a substitution if the string that I'm going to substitute is stored in a variable:
Let's say:
sed 's/abcdefg/good'
VS
tmp="abcdefg"
sed 's/$tmp/good'
The second case doesn't work. Guess it's due to the single quotes on the outside. How can I... (1 Reply)
Discussion started by: rockysfr
1 Replies
2. Shell Programming and Scripting
Hi!
I need to determin the most efficient way to do something (rather simple, I thought).
I'm currently echo(ing) a series of menu options, and reading the command input as the number associated with the entry. What I need to do is when the option 1 is selected, that it references a list and... (18 Replies)
Discussion started by: cchaloux
18 Replies
3. Shell Programming and Scripting
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
Discussion started by: alrinno
2 Replies
4. Shell Programming and Scripting
I've created a series of arrays named as follows:
row1
row2
row3
.
.
.
row10
Each has 4 elements.
I'm trying to echo the array elements out in a for loop. Here's what I have:
for ((i=1;i<=10;i++))
do
for ((j=1;j<=4;j++))
do
eval out=${row`echo $i`}
echo -n $out (3 Replies)
Discussion started by: swankgd
3 Replies
5. Shell Programming and Scripting
Hi ,
I have a variable as follows,
Temp=`cat ABC.txt | cut -c5-`
This will yeild a part of the date. say , 200912.
I would like to substitute this variable's value in a filename.
eg: File200912F.zip
when i say File$TempF.zip , it is not substituting.
Any help ?
Thanks in... (2 Replies)
Discussion started by: mohanpadamata
2 Replies
6. Shell Programming and Scripting
Hello,
This is not homework. It is a question that I received on a recent interview for a linux position. Can someone shed some light on the right answer? I got it wrong.
Thanks,
jaysunn (3 Replies)
Discussion started by: jaysunn
3 Replies
7. Shell Programming and Scripting
For example I have variable like below
echo $OUTPUT
/some/path/`uname -n`
when I try to use the variable OUTPUT like below
cd $OUTPUT or cd ${OUTPUT}
I am getting bad substituion error message
$ cd $OUTPUT
ksh: cd: bad substitution
$ cd ${OUTPUT}
ksh: cd: bad substitution
... (1 Reply)
Discussion started by: rajukv
1 Replies
8. Shell Programming and Scripting
Hi there,
I have included an external properties file into my BASH script via the 'source' command.
I am attempting to dynamically assign a variable in the BASH script, that references the variable name within the external properties file i.e.
#!/bin/bash
pth=${0%/*}
source... (3 Replies)
Discussion started by: mjwoodford
3 Replies
9. Shell Programming and Scripting
Below is hash which contains reference to variables:
my %mandatoryFields = (
1 => \$msgtype,
2 => \$switchtype,
3 => \$card_nbr,
4 => \$natv_tran_type_code,
5 => \$amt_1
);
This... (0 Replies)
Discussion started by: som.nitk
0 Replies
10. Shell Programming and Scripting
Guys,
May i know how can we de reference the code reference variable.?
my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";};
print $a->(4,5);
How can we print the whole function ?
Please suggest me regarding this.
Thanks for your time :)
Cheers,
Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies
LEARN ABOUT DEBIAN
list_members
LIST_MEMBERS(8) System Manager's Manual LIST_MEMBERS(8)
NAME
list_members - List all the members of a Mailman mailing list
SYNOPSIS
list_members [-o file] [-r] [-d] [-p] [-h] listname
OPTIONS
-o file, --output file
Write output to specified file instead of standard out.
-r, --regular
Print just the regular (non-digest) members.
-d [kind], --digest[=kind]
Print just the digest members. Optional argument can be "mime" or "plain" which prints just the digest members receiving that kind
of digest.
--nomail[=why], -n [why]
Print the members that have delivery disabled. Optional argument can be "byadmin", "byuser", "bybounce", or "unknown" which prints
just the users who have delivery disabled for that reason. It can also be "enabled" which prints just those member for whom deliv-
ery is enabled.
-f, --fullnames
Include the full names in the output.
-p, --preserve
Output member addresses case preserved the way they were added to the list. Otherwise, addresses are printed in all lowercase.
-i, --invalid
Print only the addresses in the membership list that are invalid. Ignores -r, -d, -n.
-u, --unicode
Print addresses which are stored as Unicode objects instead of normal string objects. Ignores -r, -d, -n.
-h, --help
Print a small help text and exit
listname is the name of the mailing list to use.
NOTES
Note that if neither -r or -d is supplied, both regular members are printed first, followed by digest members, but no indication is given
as to address status.
AUTHOR
Author of Mailman is the Mailman Cabal, see http://www.list.org/ for information. This manpage is written by Tollef Fog Heen
<tfheen@debian.org> for Debian, but may be used by others.
SEE ALSO
Mailman documentation on http://www.list.org/ and in /usr/share/doc/mailman.
2004-10-17 LIST_MEMBERS(8)