First post on here. So I use csh shells for my research (physics... not a CS person). I am trying to rerun the same scripts, but there are ~10 files that have similar variables that I have to change for each different configuration, so I would like one central file for the variables I change that get used in the various csh files.
Basically what I have been trying to do by scouring the internet but have had no success is to have a document with values:
and then be able to call them in different csh files as if I had just done
, where I could then reference it later as $mass[$1] for 0.645 0.645 0.645.
I have tried to do
, but I keep getting 'invalid variable' when I run the csh script.
After I compile a C program, when I run it from a C shell script, it does not print out the results.
e.g:
myCFile.c: main(){printf("Hey");}
myCshScript: myCFile
This does not output "Hey" to the terminal window. I am not even sure if it is executed or not.
What should I do to see the... (2 Replies)
hi, I have a csh script, which has
setenv X xyz etc
My shell is korn
Is there some way I can "source" this to have the variables in my current korn shell?
thanks (3 Replies)
My shell is csh and it is required.
I have a file like sample.txt
------------------------
a b c
d
e
f
g h i
------------------------
I want set the file to a variable and print it out in the same format.
I have tried something like this, but not succed.
% cat ~/tmp/sample.txt
a b c
d... (8 Replies)
I have a simple script that sets a value and reads the value in csh:
set -x
set a = 10
echo $a
The output of the script does not show the value of a
+ set a = 10
+ echo
any help would be great. (4 Replies)
I am trying to call awk from a csh script using
awk '{print $1, -$2, $3}' $fvmod.vel > $fvmod.xzv
and getting awk: Command not found.
Running
awk '{print $1, -$2, $3}' $fvmod.vel > $fvmod.xzv
on the command line with the actual filenames works (2 Replies)
I have to call two awk scripts where the second one used the output from the first one. Am wondering if it may happen that the second awk might start before the first awk finished creating the file...
if ($nAnomaly == 1) then
awk -v anomaly=$Anom -v zloc="$zmin/$zmax" -v dz=$dz \
... (1 Reply)
my working shell is csh and even though if I try to run my script in plain sh, it behaves the same way. Here's a simple script:
#!/bin/sh
desc='"test my changes"'
cmd="echo \"$desc\""
$cmd
I want $desc to be passed as an argument to another command, but csh apparently doesn't like spaces in... (5 Replies)
Hi All,
I want to check existence of variable, whose name gets decided dynamically.
E.g. value of this variable,is derived as $option_"exclude" , where value of option varies depending upon user input.
I am trying to do it in a following way :
set exclude_var = `echo $option"_exclude"`... (3 Replies)
Hi all,
I have a source config file with variables like so:
eth1_ip=192.168.1.99
eth2_ip=192.168.1.123
eth3_ip=172.16.1.1
I am trying to run a script which loops based on the number of eth interfaces on a machine and therefore modifies the variable it calls in the environment based on the... (5 Replies)
Hi All,
I have file which have looks like below
abc=${def}
def=${efg}
efg= "this is the actual value"
based on "abc" value I have to call "efg" value , Am using below lines but it is not working
#!/bin/bash
source file.txt
echo $abc
Please wrap all code, files, input &... (5 Replies)
Discussion started by: Prashanth.K
5 Replies
LEARN ABOUT DEBIAN
mail::milter::module::connectmatcheshostname
Mail::Milter::Module::ConnectMatchesHostname(3pm) User Contributed Perl Documentation Mail::Milter::Module::ConnectMatchesHostname(3pm)NAME
Mail::Milter::Module::ConnectMatchesHostname - milter to accept/reject connecting hosts matching regex(es)
SYNOPSIS
use Mail::Milter::Module::ConnectMatchesHostname;
my $milter = new Mail::Milter::Module::ConnectMatchesHostname;
my $milter2 = &ConnectMatchesHostname; # convenience
$milter2->set_message('Connecting hostname %H looks like a dynamic address');
DESCRIPTION
This milter module rejects any connecting host whose hostname contains one of a group of built-in patterns that match the IP address of the
connecting host. This is normally used to detect dynamic pool addresses.
Currently the following patterns embedded in the hostname are considered matching, where 10.11.12.13 is the IPv4 address of the connecting
host. In the following cases, the string must be preceded by a non-digit character or otherwise must be at the start of the hostname.
010.011.012.013. (optionally without internal dots, or with - in place of .)
013.012.011.010. (optionally with - in place of .)
10.11.12.13. (optionally without internal dots, or with - in place of .)
13.12.11.10. (optionally with - in place of .)
0A0B0C0D (hexadecimal, ignoring case)
More specific patterns are anticipated to be added in the future. Because of this, if you use ConnectMatchesHostname, pay attention to
this perldoc manual page when updating to a newer version of Mail::Milter.
One final note. ISPs can and do use "dynamic-looking" reverse DNS entries for what they consider to be legitimate server addresses. This
is not ideal, and may require embedding this module in a Chain set to "accept_break" with regular expressions; for example:
my $milter = new Mail::Milter::Chain(
&ConnectRegex(
'.fooisp.com$',
)->accept_match(1);
&ConnectMatchesHostname,
)->accept_break(1);
METHODS
new()
Creates a ConnectMatchesHostname object.
set_message(MESSAGE)
Sets the message used when rejecting connections. This string may contain the substring %H, which will be replaced by the matching
hostname, and/or the substring %A, which will be replaced by the matching IP address.
This method returns a reference to the object itself, allowing this method call to be chained.
BUGS
In Sendmail 8.11 and 8.12, a milter rejection at "connect" stage does not allow the reply message to be set -- it simply becomes "not
accepting messages". However, this module still attempts to set the reply code and message in the hope that this will be fixed.
The implementation of this module could be much more efficient.
AUTHOR
Todd Vierling, <tv@duh.org> <tv@pobox.com>
SEE ALSO
Mail::Milter::Object
perl v5.8.8 2004-02-26 Mail::Milter::Module::ConnectMatchesHostname(3pm)