Sponsored Content
Full Discussion: Editting each line in a file
Top Forums Shell Programming and Scripting Editting each line in a file Post 302449864 by rdcwayx on Tuesday 31st of August 2010 09:26:09 PM
Old 08-31-2010
Code:
awk '
BEGIN{print "<XML>"} 
{print "<tid>",$1,"</tid>", "<dlr>" $2 "</dlr>"  }
END {print "</XML>"} 
' infile

 

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
BLAZE-LOG(1)						    BlazeBlogger Documentation						      BLAZE-LOG(1)

NAME
blaze-log - displays the BlazeBlogger repository log SYNOPSIS
blaze-log [-cqrsCV] [-b directory] [-n number] blaze-log -h|-v DESCRIPTION
blaze-log displays the content of the BlazeBlogger repository log. OPTIONS
-b directory, --blogdir directory Allows you to specify a directory in which the BlazeBlogger repository is placed. The default option is a current working directory. -n number, --number number Allows you to specify a number of log entries to be listed. -s, --short Tells blaze-log to display each log entry on a single line. -r, --reverse Tells blaze-log to display log entries in reverse order. -c, --color Enables colored output. When supplied, this option overrides the relevant configuration option. -C, --no-color Disables colored output. When supplied, this option overrides the relevant configuration option. -q, --quiet Disables displaying of unnecessary messages. -V, --verbose Enables displaying of all messages. This is the default option. -h, --help Displays usage information and exits. -v, --version Displays version information and exits. FILES
.blaze/log A file containing the repository log. EXAMPLE USAGE
List the whole repository history: ~]$ blaze-log Date: Sun Jul 25 16:48:22 2010 Edited the page with ID 5. Date: Tue Jul 6 18:54:59 2010 Edited the page with ID 5. etc. List the whole repository history in reverse order: ~]$ blaze-log -r Date: Tue Feb 10 00:40:16 2009 Created/recovered a BlazeBlogger repository. Date: Tue Feb 10 01:06:44 2009 Added the page with ID 1. etc. Display the very first log entry on a single line: ~]$ blaze-log -rs -n 1 Tue Feb 10 00:40:16 2009 - Created/recovered a BlazeBlogger repository. SEE ALSO
blaze-init(1), blaze-config(1) BUGS
To report a bug or to send a patch, please, add a new issue to the bug tracker at <http://code.google.com/p/blazeblogger/issues/>, or visit the discussion group at <http://groups.google.com/group/blazeblogger/>. COPYRIGHT
Copyright (C) 2009-2011 Jaromir Hradilek This program is free software; see the source for copying conditions. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Version 1.2.0 2012-03-05 BLAZE-LOG(1)
All times are GMT -4. The time now is 07:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy