Replace line in file with line in another file based on matching string
HI
Can any one guide me how to achieve this task. I have 2 files
In the above configuration.properties file i need to replace the line "identity_server_url" with env.txt file content. In configuration.properites file before '=' values are constant. After '=' values are changing. So i need to replace the line with matched string before '=' in configuration.properties with env.txt
i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Hi,
I want to replace the srting '; with ABCD'; in a file from line 1 to line 65. Is there any single command to do it without using awk
Thanks for quick reply
https://www.unix.com/images/misc/progress.gif (3 Replies)
Hello all, the title makes this sound simple, and maybe it should be.
This is by code:
#!/bin/sh
cp ch25.txt ch25.fn.tex
n=`grep -c '^\' ch25_footnotes.txt > temp`
r=`awk -F] '{print $2}' temp`
`sed 's/\/\\footnote{$r}/' ch25.fn.tex`
done
This is what I am trying to... (6 Replies)
I have a file which contains several lines. Sample content of the file is as below.
OK testmessage email<test@123>
NOK receivemessage email<123@test>
NOK receivemessage email(123@test123)
NOK receivemessage email<abc@test>
i would like to know by scripting will... (10 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi
I am not the best scripter in the world and have run into a issue which you might be able to guide me on...
I have two files.
File1 :
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
File2:
C345,... (5 Replies)
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
I don't know if it's been asked before but seems i gave up seeking.
i have 2 files :
file1.txt
Monday XXXX
Tuesday XXXX
XXXX Wednesday
Thursday XXXX
XXXX is in every lines of file1.txt and i want to replace them with each line in file2.txt:
home
school
cinema
so output file is:
... (19 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT LINUX
avahi.service
avahi.service(5) File Formats Manual avahi.service(5)NAME
avahi.service - avahi-daemon static service file
SYNOPSIS
/etc/avahi/services/*.service
DESCRIPTION
/etc/avahi/services/*.service are XML fragments containing static DNS-SD service data. Every service file can contain multiple service def-
initions which share the same name. This is useful for publishing service data for services which implement multiple protocols. (i.e. a
printer implementing _ipp._tcp and _printer._tcp)
XML TAGS
<service-group> The document tag of avahi service files. Should contain one <name> and one or more <service> elements.
<name replace-wildcards="yes|no"> The service name. If replace-wildcards is "yes", any occurence of the string "%h" will be replaced by the
local host name. This can be used for service names like "Remote Terminal on %h". If replace-wildcards is not specified, defaults to "no".
<service protocol="ipv4|ipv6|any"> Contains the service information for exactly one service type. Should contain one <type> and one <port>
element. Optionally it may contain one <domain-name>, one <host-name>, any number of <subtype> and any number of <txt-record> elements. The
attribute protocol specifies the protocol to advertise the service on. If any is used (which is the default), the service will be adver-
tised on both IPv4 and IPv6.
<type> Contains the DNS-SD service type for this service. e.g. "_http._tcp".
<subtype> Contains an additional DNS-SD service subtype for this service. e.g. "_anon._sub._ftp._tcp".
<domain-name> The domain name this service should be registered. If omited defaults to the default domain of the avahi daemon. (probably
.local)
<host-name> The host name of the host that provides this service. This should be a host that is resolvable by multicast or unicast DNS.
Please note that you need to specify a fully-qualified domain name (FQDN) here, i.e. .local is not appended implicitly! The host name
doesn't need to be part of the domain specified in <domain-name>. See avahi.hosts(5) for more information how to publish additional host
name mappings.
<port> The IP port number the service listens on.
<txt-record> DNS-SD TXT record data.
AUTHORS
The Avahi Developers <avahi (at) lists (dot) freedesktop (dot) org>; Avahi is available from http://avahi.org/
SEE ALSO avahi-daemon(8), avahi.hosts(5)COMMENTS
This man page was written using xml2man(1) by Oliver Kurth.
Manuals User avahi.service(5)