09-12-2012
Need help with sorting in paragraphs
I am very new to shell scripting, current try to do a sorting of a text file in paragraphs with ksh script.
example:
File content:
A1100001 line 1 = "testing"
line 2 = something,
line 3 = 100
D1200003 line 1 = "testing"
line 2 = something,
line 3 = 100
B1200003 line 1 = "testing"
line 2 = something,
line 3 = 100
i want the output to be like:
output:
A1100001 line 1 = "testing"
line 2 = something,
line 3 = 100
B1200003 line 1 = "testing"
line 2 = something,
line 3 = 100
D1200003 line 1 = "testing"
line 2 = something,
line 3 = 100
i try use sort but it will sort every line, instead of the 3 lines together
Any advise on how to do a sort by the "A1100001" yet move the 3 lines togther?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all
i want help in sortng date in paragraphs within file ,
i want to ask as if there any option to sort a certain pattern of file not the rest of file.i.e the data of file become sorted with respect to date
i have a log file as follows
!! *A0628/081 /08-01-10/13 H... (1 Reply)
Discussion started by: nabmufti
1 Replies
2. UNIX for Dummies Questions & Answers
Hi everyone,
I have a file with multiple entries and I would like to remove the ones that contain either /A"> or /A/, where A can be any letter of the alphabet. Here's an example of the entries:
<Topic r:id="Top/World/Fran">
<catid>476</catid>
<link... (1 Reply)
Discussion started by: BlueberryPickle
1 Replies
3. Shell Programming and Scripting
Hi,
I am trying to filter out those paragraphs that contains 'CONNECT', 'alter system switch logfile'. That means say the input file is :
-------------------------------------------------------
Wed Jun 7 00:32:31 2006
ACTION : 'CONNECT'
CLIENT USER: prdadm
CLIENT TERMINAL:
Wed Jun 7... (7 Replies)
Discussion started by: cnlhap
7 Replies
4. Shell Programming and Scripting
Hi,
I have a log file which might have certain paragraphs.
Switch not possible Error code 1234
Process number 678
Log not available Error code 567
Process number 874
.....
......
......
Now I create an exception file like this.
cat text.exp
Error code 1234
Process number 874 (7 Replies)
Discussion started by: kaushys
7 Replies
5. Shell Programming and Scripting
hi,
i am a SED newbie and i need some help. i have a log file as shown below. and i want to search specific Error Code, and fetch the whole paragraph.
...
...
.................
....ErrCode...
.................
...
...
...
.................
....ErrCode...
... (4 Replies)
Discussion started by: ipat
4 Replies
6. Shell Programming and Scripting
hi,
i have file,
file is separated into parahgraphs by these line(----------).
i want to find out logId = string : "AIALARM", in each parahgraph or page
if found then i want to cut next five lines....
... (3 Replies)
Discussion started by: dodasajan
3 Replies
7. Shell Programming and Scripting
Hi all,
I want to extract some paragraphs out of a file under certain conditions.
- The paragraph must start with 'fmri'
- The paragraph must contain the string 'restarter svc:/system/svc/restarter:default'
My input is like that :
fmri svc:/system/vxpbx:default
state_time Wed... (4 Replies)
Discussion started by: Armoric
4 Replies
8. Shell Programming and Scripting
Hi all!
I want to make a code to split sentences into paragraphs maybe
4-5 sentences into one <p>text</p>
there are no new lines in the text string
any ideas with AWK, SSH?
Thank you! (5 Replies)
Discussion started by: sanantonio7777
5 Replies
9. Shell Programming and Scripting
Hi,
i know that i can format a whole file using
fmt -w 78 file > file_new
Now, i would like to implement a rule in the following way:
- If a paragraph starts with % (and ends with %), the paragraph should remain unchanged.
- Otherwise the command stated above should be applied to the... (4 Replies)
Discussion started by: johnlocke85
4 Replies
10. Shell Programming and Scripting
Hi,
I have a text with a number of paragraphs in them. My problem is I need to locate certain errors/warning and extract/count them. Problem is I do not know how many paras are there with that particular type of error/warning. I had thought that somehow if I could count the number of... (25 Replies)
Discussion started by: dsid
25 Replies
LEARN ABOUT DEBIAN
cobertura-check
COBERTURA-CHECK(1) General Commands Manual COBERTURA-CHECK(1)
NAME
cobertura-check -- show which classes do not have adequate test coverage
SYNOPSIS
cobertura-check [--branch 0..100] [--datafile file] [--line 0..100] [--regex regex:branchrate:linerate] [--packagebranch 0..100]
[--packageline 0..100] [--totalbranch 0..100] [--totalline 0..100]
DESCRIPTION
cobertura-check can be run after your JUnit tests to show which classes do not have adequate test coverage.
OPTIONS
If no parameters are specified then all values will be set to 50%.
--branch 0..100
Specify the minimum acceptable branch coverage rate needed by each class. This should be an integer value between 0 and 100.
Default value is 0.
--datafile file
Specify the name of the file containing metadata about your classes. Default value: "./cobertura.ser".
--line 0..100
Specify the minimum acceptable line coverage rate needed by each class. This should be an integer value between 0 and 100.
Default value is 0.
--regex regex:branchrate:linerate
For finer grained control, you can optionally specify minimum branch and line coverage rates for individual classes using any
number of regular expressions.
--packagebranch 0..100
Specify the minimum acceptable average branch coverage rate needed by each package. This should be an integer value between 0 and
100. Default value is 0.
--packageline 0..100
Specify the minimum acceptable average line coverage rate needed by each package. This should be an integer value between 0 and
100. Default value is 0.
--totalbranch 0..100
Specify the minimum acceptable average branch coverage rate needed by the project as a whole. This should be an integer value
between 0 and 100. Default value is 0.
--totalline 0..100
Specify the minimum acceptable average line coverage rate needed by the project as a whole. This should be an integer value
between 0 and 100. Default value is 0.
SEE ALSO
junit(1), cobertura-instrument(1), cobertura-report(1), cobertura-merge(1).
AUTHOR
This manual page was written by Miguel Landaeta <miguel@miguel.cc> for the Debian system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under the terms of the terms of GNU General Public License, Version 2 or any later
version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
COBERTURA-CHECK(1)