02-24-2017
Hello,
I think I get the gist of what you're saying. What would be useful though would be if you could:
1. Provide an example entry in its original form
2. Provide a modified copy of that entry as you would want it to look afterwards
If you can provide something like that - an entire entry in the form it exists in the file, and a modified example of how you want it to look after your script has run - that would make things easier and clearer in terms of being able to help you come up with a solution.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I'm newbie in UNIX. I would like to ask how to read a file which in Microsoft word format? Inside the doc file is just a few sentences . "It is a text. Help me with it". and I would like to replace the the word of text to message.
I was trying with this
for i in `find . -type f -name... (8 Replies)
Discussion started by: tee
8 Replies
2. Shell Programming and Scripting
File having data in following format :
file name : file.txt
--------------------
111111;name1
222222;name2
333333;name3
I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2).
i.e val1=11111 &... (2 Replies)
Discussion started by: sjoshi98
2 Replies
3. Shell Programming and Scripting
Hi,
I want to replace a word in a file which occurs after a particular word.
For example :
$cat file.txt
CASE
WHEN
AND c1 = 'I'
AND c2= '2'
THEN 1
WHEN
AND c1= 'I'
AND c2= '0'
THEN 2
So in this example i want to replace... (4 Replies)
Discussion started by: ashwin3086
4 Replies
4. Shell Programming and Scripting
Hello Friends,
How to substitue with a word by another word in file written in VI Editor.
Thanks & Regards
Siva Ranganath
7760774961 (2 Replies)
Discussion started by: sivaranganath
2 Replies
5. Shell Programming and Scripting
Hi All,
I have a file in which a number of lines are starting with similar first word but different next words.
I want to replace the any nth word(not 1st or 2nd) with another word.
Eg:- My file contains are like this:-
Ram is a boy.
Ram is a good boy.
Ram plays cricket.
Here I want to... (2 Replies)
Discussion started by: mukeshbaranwal
2 Replies
6. Shell Programming and Scripting
Hi
i am having a shell script reading two arguments.
when the shell script is passed with argument containing $ in it, the value from $ onwards is getting truncated and my script is failing.
i have to do in reading the arguments in the shell script only as i am not having control on the... (3 Replies)
Discussion started by: duddukuri
3 Replies
7. Shell Programming and Scripting
Hi Everyone,
I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap".
For Example:
In the Directory,
$pwd
/home/nick
$ grep -l "xsgd1234dap" *.sh | wc -l
119
I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies
8. Shell Programming and Scripting
Hi All,
Hope you guys had a wonderful weekend
I have a scenario where in which I have to read a file line by line
and check for few words before redirecting to a file
I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies
9. Shell Programming and Scripting
Hi All,
I have a XML file which is looks like as below. <<please see the attachment >>
<?xml version="1.0" encoding="UTF-8"?>
<esites>
<esite>
<name>XXX.com</name>
<storeId>10001</storeId>
<module>
... (4 Replies)
Discussion started by: Rajeev_hbk
4 Replies
10. Shell Programming and Scripting
echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} |
awk 'gsub(/^|abc,|$/,"") {print}'
Required output
{grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies
LEARN ABOUT CENTOS
avahi.service
avahi.service(5) File Formats Manual avahi.service(5)
NAME
avahi.service - avahi-daemon static service file
SYNOPSIS
/home/lennart/tmp/avahi/etc/avahi/services/*.service
DESCRIPTION
/home/lennart/tmp/avahi/etc/avahi/services/*.service are XML fragments containing static DNS-SD service data. Every service file can con-
tain multiple service definitions which share the same name. This is useful for publishing service data for services which implement multi-
ple 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)