01-07-2003
Setting a variable
I want to set a variable to be any number of dashes. Rather than doing the following:
MYVAR="------------------"
I'd like to be able to set the variable to, say, 80 dashes but don't want to have to count 80 dashes. Is there a way to do this?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies
2. Programming
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies
3. Shell Programming and Scripting
L=0
cat test.sh | while read line
do
L='expr $1 + 1'
echo $L
done
echo $l
>>> the echo $L at the end produces 0 but i actually want it to produce the number of lines - any idea why this is happening? (16 Replies)
Discussion started by: penfold
16 Replies
4. UNIX for Dummies Questions & Answers
I need some syntax help (working in a bash shell)
I have a variable which is a filename with an extension, and I need to create another variable with the same name but a different extension
To explain, the input file should be called something like "filename.L1" and the output file should be... (1 Reply)
Discussion started by: Slanter
1 Replies
5. Shell Programming and Scripting
How do you set a varible with information that contains a string and also another variable? For example:
subject="Attention: $name / This $type needs your attention"
The $xxxx are of course other variables that I instantiated earlier. Is it like Java where you have to use double quotes and... (1 Reply)
Discussion started by: briskbaby
1 Replies
6. UNIX for Dummies Questions & Answers
In my script, I have the following command....
du -sk `ls -ltd sales12|awk '{print $11}'`|awk '{print $1}'
it returns the value
383283
I want to modify my script to capture that value into a variable. So, I try doing the following...
var1=`du -sk `ls -ltd sales12|awk '{print... (5 Replies)
Discussion started by: tumblez
5 Replies
7. Shell Programming and Scripting
I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat.
how can i do this???
... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies
8. Programming
Hi,
I already have one CPP program which invokes the C program.And the C program contains whole function definitions..!This is a working program..I have to enable the logs in both CPP as well as in the C program ..!So I am reading the enviornmental variable log path from the CPP and doing the... (2 Replies)
Discussion started by: Kattoor
2 Replies
9. Shell Programming and Scripting
Hi,
i have a variable which i would like to set inside an if block
for example
IS_VAR=0
if
then
IS_VAR=1
fi
echo IS_VAR
the last echo statement gives 0.So setting variables in the if block doesnt have effect outside the block?Is there any workaround for this?
Thanks ,
Padmini (11 Replies)
Discussion started by: padmisri
11 Replies
10. UNIX for Dummies Questions & Answers
Hi ,
Whenever i want to start tomcat server I need to go to <tomcatdir>\bin
and execute startup.sh file.
How would i make this happen whenever i start my machine?
Also want to know How would i set the variable at startup.
for example
I want to set JAVA_HOME and JRE_HOME whenever the... (3 Replies)
Discussion started by: pinga123
3 Replies
LEARN ABOUT SUSE
moderators
MODERATORS(5) InterNetNews Documentation MODERATORS(5)
NAME
moderators - Submission addresses for moderated groups
DESCRIPTION
When an unapproved article is posted locally to a moderated newsgroup, it is not passed off to innd for normal handling; instead, it is
sent via e-mail to the submission address for that newsgroup. The submission address is determined using this configuration file.
The file pathetc/moderators is a list of associations between uwildmat(3) patterns matching newsgroups and the submission address for those
newsgroups. Blank lines and lines starting with a number sign ("#") are ignored. All other lines should consist of two fields separated
by a colon:
<pattern>:<address>
The first field is a uwildmat(3) pattern matching the group or groups to which this line applies. The first matching line is used, so more
specific patterns should be listed before general patterns.
The second field, the submission address, should be a simple e-mail address with one exception: at most one %s may occur anywhere in the
address. If present, it will be replaced by the name of the newsgroup, with all periods in the name changed to dashes ("-"). If there is
a literal "%" in the submission address, it must be written as "%%", even if not followed by an "s".
With the %s syntax, periods are converted to dashes for historical reasons, from back in the days when periods in the local part of
addresses were not always handled correctly. It's probably no longer necessary, but so much now depends on it that it can't be easily
changed.
It's intended that the sample moderators file included in the INN distribution always be sufficient for all world-wide newsgroups. The
hosts behind moderators.isc.org have graciously volunteered to handle forwarding tasks for all world-wide newsgroups so that individual
sites don't have to keep track of the submission addresses for moderated groups. The forwarding database used by moderators.isc.org is
coordinated by <moderators-request@isc.org>; if you know of a world-wide newsgroup hierarchy that is not correctly handled by
moderators.isc.org, please send the details to that address.
Given that, the only thing you should have to add to the sample file under normal circumstances are the forwarding addresses for local or
limited-distribution moderated groups.
If this file doesn't exist, or if a post is made to a moderated group that has no matching entry in this file, nnrpd falls back on the
value of moderatormailer set in inn.conf and, failing that, rejects the post.
EXAMPLES
Here is a sample file:
example.important:announce@example.com
example.*:%s@smtp.example.com
*:%s@moderators.isc.org
Using the above file, postings to the moderated newsgroup in the left column below will be sent to the address shown in the right column
below:
example.important announce@example.com
example.x-announce example-x-announce@smtp.example.com
alt.dev.null alt-dev-null@moderators.isc.org
Note that periods are changed to dashes and dashes are left alone with the %s syntax, so two moderated newsgroups whose names differ only
by changing a period to a dash would go to the same address. Such newsgroup pairs should therefore not be created.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Rewritten in POD by Russ Allbery <rra@stanford.edu>.
$Id: moderators.pod 8830 2009-11-29 16:49:59Z iulius $
SEE ALSO
inn.conf(5), nnrpd(8), uwildmat(3).
INN 2.5.2 2010-02-08 MODERATORS(5)