Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
my script:
amount1=`tail /tmp/file1.txt`
amount2=`tail /tmp/file2.txt`
sed -e 's/'${amount2}'/'${amount1}'/g' filename1 > filename2
what did i do wrong ? i just want to replace amount1 with amount2 value. (2 Replies)
Hi,
i am following content in file
cat file
Install Installation-path variable
Now i need to replace Installation-path with some text to be provided as argument in csh script invocation
My question is , can i replace this by only using path
eg.
sed "s/path/$1" file
but it... (1 Reply)
I'm trying to change a "." in a file name with a "_"
I have tried;
sed -e 's/./_/g'
However this then replaces the entire filename with a load of "_"
For example;
ls /usr/local/feed/service/customers/test1/configs/test1.httpsend | awk -F/ '{print $9}' | tr "" "" | sed -e "s/./_/g"
... (2 Replies)
Hello,
I have a comman separated file lets day data.txt in following format
,:000002 CH XIN9I.INDX, 34.7534909645,:000002 CH,:Index XIN9I.INDX
,:000063 CH XIN9I.INDX, 6.3062924781,:000063 CH,:Index XIN9I.INDX
,:000776 CH XIN9I.INDX, 2.7001954832,:000776 CH,:Index XIN9I.INDX
I would like... (9 Replies)
Hi,
I have values in a file at Place $1 as AmericanDollar, AustralianDollar, Singapore1Dollar and so on on various rows. I want to replace Dollar with Pound for all those records where no numeric character is present in the string. Means in above mentioned values 'Singapore1Dollar' should not be... (11 Replies)
Hi,
i have a file as give below
>cat sample_file
param1 val1 2012-06-19
##there can be one or more space after 2012-06-19 in the above file
i want to replace val1 with a with value passed through a variable...
below is the command i tried
>parval='param1 val2'
>par1=param1
>sed... (3 Replies)
How can we empty or replace with null, following block of code (within the php quotes including the quotes) from inside a file.
*** some other data above this code
<?
#317008#
... (5 Replies)
I have a file whose output words are always like this:
aaaa
bbbb
cccc
dddd. Trying to arrange the data so that there are 2 columns such that the 1st word become the 1st column like this:
aaaa aaaa
aaaa bbbb
aaaa cccc
aaaa dddd Trying to use awk... (8 Replies)
Discussion started by: jimmyf
8 Replies
LEARN ABOUT SUNOS
domain
DOMAIN(8) InterNetNews Documentation DOMAIN(8)NAME
domain - nnrpd domain resolver
SYNOPSIS
domain domainname
DESCRIPTION
This program can be used in readers.conf to grant access based on the subdomain part of the remote hostname. In particular, it only
returns success if the remote hostname ends in domainname. (A leading dot on domainname is optional; even without it, the argument must
match on dot-separated boundaries). The "username" returned is whatever initial part of the remote hostname remains after domainname is
removed. It is an error if there is no initial part (that is, if the remote hostname is exactly the specified domainname).
EXAMPLE
The following readers.conf(5) fragment grants access to hosts with internal domain names:
auth internal {
res: "domain .internal"
default-domain: "example.com"
}
access internal {
users: "*@example.com"
newsgroups: example.*
}
Access is granted to the example.* groups for all connections from hosts that resolve to hostnames ending in ".internal"; a connection from
"foo.internal" would match access groups as "foo@example.com".
BUGS
It seems the code does not confirm that the matching part is actually at the end of the remote hostname (e.g., "domain: example.com" would
match the remote host "foo.example.com.org" by ignoring the trailing ".org" part).
Does this resolver actually provide any useful functionality not available by using wildcards in the readers.conf(5) hosts parameter? If
so, the example above should reflect this functionality.
HISTORY
This documentation was written by Jeffrey M. Vinocur <jeff@litech.org>.
$Id: domain.pod 8200 2008-11-30 13:31:30Z iulius $
SEE ALSO nnrpd(8), readers.conf(5)INN 2.5.3 2009-05-21 DOMAIN(8)