12-06-2011
How to search and append words in the same file using unix scripting file operations
Hi ,
I have a file myhost.txt which contains below,
127.0.0.1 localhost
1.17.1.5 atrpx958
11.17.10.11 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958(which is hostname) only, in the file and append the words in the same file.
How can we do it using unix scripting file operations to acheive this..
Thanks in advance.
--Sree
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
i would like to search in a directory. all files they were found shoul be opend and looked about a keyword. if keyword is found i want to see the name of the file. i've rtfm of find and have a command like this :
find /etc -exec cat \{}\ | grep KEYWORD
but don't work, and :
find... (4 Replies)
Discussion started by: Agent_Orange
4 Replies
2. Shell Programming and Scripting
Hi,
I want to compare two files. Files will look like as follows:
file1:
ASDFGHJU|1234567890123456
QWERTYUI|3456789098900890
file2:
ZXCVBVNM|0987654321234567
POLKIJUYH|1234789060985478
output file should be:
ASDFGHJU|1234567890123456
QWERTYUI|3456789098900890
Thnaks in advance (6 Replies)
Discussion started by: nivas
6 Replies
3. Shell Programming and Scripting
Hi,
Iam having the two files as follows:
file1:
ASQWEDFR09876543121234512
POIUYTREW09876512345676788
ZXCVBNMKS1209888888888888
file2:
ASQWEDFR09876543121234516 asdcvfgbtg@abc.com 0000000-90-1239--2008 8990----
CXADFGTU09876543121234789 asdcvfgbtg@abc.com ... (14 Replies)
Discussion started by: nivas
14 Replies
4. Shell Programming and Scripting
hi All,
my query...
1.I Have to search for the files in the root directory.
2.i have to search for a pattern in all the files in the root directory and then replace them with a new pattern.
3.Rename the file
Explanation:
if ABC is the root folder and has 3 subfolders and there are 15... (9 Replies)
Discussion started by: adityamahi
9 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have 1 - 100 file I want the list of such file which contains word 'internet' Please provide command to do this (3 Replies)
Discussion started by: kaushik02018
3 Replies
6. Shell Programming and Scripting
Hi ,
I have a file myhost.txt which contains below,
127.0.0.1 localhost
1.17.1.5 atrpx958
11.17.10.11 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958 only in... (2 Replies)
Discussion started by: gsreeni
2 Replies
7. Shell Programming and Scripting
Hello,
I want to search a string/substring from the second column in file in another file and append the first found record in second file to the end of the record in the first file. Both files are tab delimited.
All lines with KOG in col13 do not need to be searched as it will not be... (7 Replies)
Discussion started by: gina.lizar
7 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display... (1 Reply)
Discussion started by: 12ic11
1 Replies
9. Shell Programming and Scripting
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display which volume pool a given... (1 Reply)
Discussion started by: 12ic11
1 Replies
10. Shell Programming and Scripting
Hi Don, this is not homework question. I work for a Credit card company and my development goal this year is to learn Unix. I would love if others can help me get started, thanks.
Hi everyone
I am new to Unix and need help writing a script that can ask user for an input, then search that input... (2 Replies)
Discussion started by: 12ic11
2 Replies
LEARN ABOUT DEBIAN
dkimproxy.in
dkimproxy.in(8) System Manager's Manual dkimproxy.in(8)
NAME
dkimproxy.in - SMTP proxy for verifying DKIM signatures
DESCRIPTION
dkimproxy.in listens on the IP address and TCP port specified by its first argument (the "listen" port), and sends the traffic it receives
onto the second argument (the "relay" port), with messages getting verified and having an "Authentication-Results" header added to them.
SYNOPSIS
dkimproxy.in [options] LISTENADDR:PORT RELAYADDR:PORT
smtp options:
--conf_file=FILENAME
--listen=LISTENADDR:PORT
--relay=RELAYADDR:PORT
--reject-error
verification options:
--reject-fail
--hostname=HOSTNAME
daemon options:
--daemonize
--user=USER
--group=GROUP
--pidfile=PIDFILE
--min_servers=NUM
OPTIONS
--daemonize
If specified, the server will run in the background.
--group=GROUP
If specified, the daemonized process will setgid() to the specified GROUP.
--hostname=HOSTNAME
Overrides the hostname used in the Authentication-Results header. This header gets added to every verified message. Use this option if
the hostname that appears is not fully qualified or you want to use an alternate name.
--pidfile=PIDFILE
Creates a PID file (a file containing the PID of the process) for the daemonized process. This makes it possible to check the status of the
process, and to cleanly shut it down.
--reject-error
This option specifies what to do if an error occurs during verification of a message. If this option is specified, the message will be
rejected with an SMTP error code. This will result in the MTA sending the message to try again later, or bounce it back to the sender
(depending on the exact error code used). If this option is not specified, the message will be passed through with an error listed in the
Authentication-Results header instead of the verification results.
--reject-fail
This option specifies what to do if verification fails and the sender signing policy says to reject the message. If this option is speci-
fied, the message will be rejected with an SMTP error code. This will result in the sending MTA to bounce the message back to the sender.
If this option is not specified, the message will pass through as normal.
--user=USER
If specified, the daemonized process will setuid() to USER after completing any necessary privileged operations, but before accepting con-
nections.
--min_servers=NUM
Number of process that DKIMproxy shall spawn and get ready for filtering.
EXAMPLE
For example, if dkimproxy.in is started with:
dkimproxy.in --reject-fail --reject-error 127.0.0.1:10025 127.0.0.1:10026
the proxy will listen on port 10025 and send the verified messages to some other SMTP service on port 10026.
CONFIGURATION FILE
Parameters can be stored in a separate file instead of specifying them all on the command line. Use the conf_file option to specify the
path to the configuration file, e.g.
dkimproxy.in --conf_file=/etc/dkimproxy_in.conf
The format of the configuration file is one option per line: name of the option, space, then the value of the option. E.g.
# this is an example config file
listen 127.0.0.1:10025
relay 127.0.0.1:10026
hostname myhost.example.com
reject_fail
is equivalent to
dkimproxy.out --hostname=myhost.example.com --reject-fail 127.0.0.1:10025 127.0.0.1:10026
SEE ALSO
dkimproxy.out(8), dkim_responder(1), dkimsign(1), dkimverify(1)
dkimproxy.in(8)