Sponsored Content
Full Discussion: Editting each line in a file
Top Forums Shell Programming and Scripting Editting each line in a file Post 302449551 by mskalyani on Tuesday 31st of August 2010 02:09:42 AM
Old 08-31-2010
Thanks alot that worked
is there any chance to add <XML> at the start of the file and </XML> at the end . I will be appending these kind of records to the same file daily .
example :
day 1: <XML>
<tid>s99152g</tid> <dir>33420</dir> <date>29/Aug/2010</date> <time>02:46:48</time> <url>/service/claimadmin/quicklop/dcx</url>
<tid>s07560k</tid> <dir>33132</dir> <date>29/Aug/2010</date> <time>03:31:55</time> <url>/service/claima
dmin/quicklop/dcx</url>
</XML>

day 2 :
<tid>s99152g</tid> <dir>33420</dir> <date>29/Aug/2010</date> <time>02:46:48</time> <url>/service/claimadmin/quicklop/dcx</url>
<tid>s07560k</tid> <dir>33132</dir> <date>29/Aug/2010</date> <time>03:31:55</time> <url>/service/claima
dmin/quicklop/dcx</url>
<tid>s07560k</tid> <dir>33132</dir> <date>29/Aug/2010</date> <time>03:44:47</time> <url>/service/claima
dmin/quicklop/dcx</url>
</XML>
new records needs to be added between these <XML> tags is it possible if so please let me know .

Thanks in advance
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file editting with shell programmin

Hello, I have several handreds of text files. The format of file looks like: column1 column2 column3 column4 column5 id1 definition1 name1 fieldid comm1 id2 definition2 name2 fieldid ... (4 Replies)
Discussion started by: ssshen
4 Replies

2. Shell Programming and Scripting

Unix file editting commands

ok, are there any other file editting commands out there other than the below that comes with sunsolaris & linux vi, emacs, ed, (1 Reply)
Discussion started by: Terrible
1 Replies

3. Shell Programming and Scripting

editting file

Hi, I am having sequence of process ids in one file. My file contents is (Output of fuser someobject.so). 654 14583 17890 25902 This no. of processes may vary depends up on the object. I want to check all the processes one by one. If i want to apply egrep, I need to... (3 Replies)
Discussion started by: sharif
3 Replies

4. UNIX for Dummies Questions & Answers

matching IDs from two files and editting

I have two files. One has: ID# 0 a b c d e f g h i j k....................~2 milion columns ID# 0 l m n o p q r s t u v....................~2 milion columns . . . ~6000 lines Other has: ID# 1 or ID# 2 . . ~6000 lines (2 Replies)
Discussion started by: polly_falconer
2 Replies

5. Shell Programming and Scripting

[Solved] Problem in reading a file line by line till it reaches a white line

So, I want to read line-by-line a text file with unknown number of files.... So: a=1 b=1 while ; do b=`sed -n '$ap' test` a=`expr $a + 1` $here do something with b etc done the problem is that sed does not seem to recognise the $a, even when trying sed -n ' $a p' So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies

6. Shell Programming and Scripting

Read file line by line and process the line to generate another file

Hi, i have file which contains data as below(Only sample shown, it may contain more data similar to the one shown here) i need to read this file line by line and generate an output file like the one below i.e based on N value the number of MSISDNs will vary, if N=1 then the following... (14 Replies)
Discussion started by: aemunathan
14 Replies

7. Linux

Problem editting the first occurence of a pattern in the first uncommented line

Hi I have to replace a pattern found in the first uncommented line in a file. The challenge I'm facing is there are several such similar lines but I have to edit only the first uncommented line. Eg: #this is example #/root/xyz:Old_Pattern /root/xyz:Old_Pattern /root/xyz:Old_Pattern ... (10 Replies)
Discussion started by: Stoner008
10 Replies

8. Shell Programming and Scripting

Editting a record

robert (6 Replies)
Discussion started by: robert89
6 Replies

9. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

10. Shell Programming and Scripting

How to read file line by line and compare subset of 1st line with 2nd?

Hi all, I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like: <date1>|<data1>|<url1>|<result1> <date2>|<data2>|<url2>|<result2> <date3>|<data3>|<url3>|<result3> <date4>|<data4>|<url4>|<result4> What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
syseventconfd(1M)					  System Administration Commands					 syseventconfd(1M)

NAME
syseventconfd - kernel system event command invocation daemon SYNOPSIS
/usr/lib/sysevent/syseventconfd [-r rootdir] DESCRIPTION
syseventconfd is the user-level daemon that invokes user-level commands in response to kernel system events received from syseventd(1M). OPTIONS
The following options are supported: -r rootdir Cause syseventconfd to use an alternate root path when creating its door. The root path must match the root path used to invoke syseventd. FILES
/etc/sysevent/syseventconfd_event_service syseventconfd event service door file /usr/lib/sysevent/modules/sysevent_conf_mod.so syseventd loadable module (SLM) managing sysevent.conf files ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), svcadm(1M), syseventd(1M), attributes(5), smf(5) NOTES
The syseventconfd service is managed by the service management facility, smf(5), under the service identifier: svc:/system/sysevent:default Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. SunOS 5.11 6 Aug 2004 syseventconfd(1M)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy