Need help to create the script that does the following : -
1. Compare the current line "column B and C" with next line "column B and C"
2. If they are the same, print output to a file
Input file
Output file
Last edited by Scrutinizer; 08-25-2014 at 06:19 AM..
Reason: CODE tags added
Hello,
I am newcomer and sorry for this simple question. I want to how to compare two lines in a file? For example, to compare the first line and the second line of a file to know if they are same?
Thanks in advance!
Leon (3 Replies)
Hi, I want to compare the last two lines of a files, specifically characters 32 - 50 in both lines and generate an exit code if the range of characters do not match. Please advise. Thanks in advance! (2 Replies)
I need a simple script to parse a file with this data in it and have that script output a warning when CurrCapacity is more that 50% of MaxCapacity for a given pool Name, can anyone help ?
CurrCapacity: 5
MaxCapacity: 20
Name: fhlwDSource
CurrCapacity: 5
... (3 Replies)
Hi everybody,
I have a file that looks like:
A B C D -1 0
E F G H -2 0
I J K L +1
M N O P -6
I would like to compare $5 of every line. If both values are negative, I calculate a mean value and write the first line and delete the second one. If the two $5 values are different only... (6 Replies)
Hey guys I am having a problem with being able to find unused profiles in a configuration check script I am trying to create for accountability purposes for managing a large number of systems. What I am trying to do is run a script that will look at the raw config data in a file and pull all the... (3 Replies)
could someone write a short script which is able to take a text file input and compare lines 1 and 2, 3 and 4, 5 and 6 ... ... until the end of the file. And to prompt if the lines are not equal.
Thank you! (10 Replies)
Hi Folks,
I need to compare the cron's timings from a text file. Need to display how much time does it took for that job.
For example i have the below txt file, I have cron1 started at 05:23:15 and completed at 05:25:57, now i need to find how much time did it took to complete corn1 job for... (8 Replies)
I have a file lets say input.csv having two columns like-
Name,Mobile No
A,111
B,222
A,333
A,123
B,213
I would like to find result in a new file lets say output.csv as-
Name,Mobile No
A,111
B,222
means short the file on the basis of first column and first value corresponding to the... (5 Replies)
HI,
I have 2 text files. file1 and file2.
file1.txt (There are no duplicates in this file)
1234
3232
4343
3435
6564
6767
1213
file2.txt
1234,wq,wewe,qwqw
1234,as,dfdf,dfdf
4343,asas,sdds,dsds
6767,asas,fdfd,fdffd
I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
Discussion started by: Little
6 Replies
LEARN ABOUT XFREE86
groff_me
GROFF_ME(7) Miscellaneous Information Manual GROFF_ME(7)NAME
groff_me - troff macros for formatting papers
SYNOPSIS
groff -me [ options ] file ...
groff -m me [ options ] file ...
DESCRIPTION
This manual page describes the GNU version of the -me macros, which is part of the groff document formatting system. This version can be
used with both GNU troff and Unix troff. This package of troff macro definitions provides a canned formatting facility for technical
papers in various formats.
The macro requests are defined below. Many troff requests are unsafe in conjunction with this package, however, these requests may be used
with impunity after the first .pp:
.bp begin new page
.br break output line here
.sp n insert n spacing lines
.ls n (line spacing) n=1 single, n=2 double space
.na no alignment of right margin
.ce n center next n lines
.ul n underline next n lines
Output of the pic, eqn, refer, and tbl preprocessors is acceptable as input.
FILES
/usr/share/groff/1.21/tmac/me.tmac (a wrapper file for e.tmac)
/usr/share/groff/1.21/tmac/e.tmac
SEE ALSO groff(1), troff(1)-me Reference Manual, Eric P. Allman
Writing Papers with Groff Using -me
REQUESTS
This list is incomplete; see The -me Reference Manual for interesting details.
Request Initial Cause Explanation
Value Break
.(c - yes Begin centered block
.(d - no Begin delayed text
.(f - no Begin footnote
.(l - yes Begin list
.(q - yes Begin major quote
.(x x - no Begin indexed item in index x
.(z - no Begin floating keep
.)c - yes End centered block
.)d - yes End delayed text
.)f - yes End footnote
.)l - yes End list
.)q - yes End major quote
.)x - yes End index item
.)z - yes End floating keep
.++ m H - no Define paper section. m defines the part of the paper, and can be C (chapter), A (appendix), P (preliminary, e.g.,
abstract, table of contents, etc.), B (bibliography), RC (chapters renumbered from page one each chapter), or RA (ap-
pendix renumbered from page one).
.+c T - yes Begin chapter (or appendix, etc., as set by .++). T is the chapter title.
.1c 1 yes One column format on a new page.
.2c 1 yes Two column format.
.EN - yes Space after equation produced by eqn or neqn.
.EQ x y - yes Precede equation; break out and add space. Equation number is y. The optional argument x may be I to indent equation
(default), L to left-adjust the equation, or C to center the equation.
.GE - yes End gremlin picture.
.GS - yes Begin gremlin picture.
.PE - yes End pic picture.
.PS - yes Begin pic picture.
.TE - yes End table.
.TH - yes End heading section of table.
.TS x - yes Begin table; if x is H table has repeated heading.
.b x no no Print x in boldface; if no argument switch to boldface.
.ba +n 0 yes Augments the base indent by n. This indent is used to set the indent on regular text (like paragraphs).
.bc no yes Begin new column
.bi x no no Print x in bold italics (nofill only)
.bu - yes Begin bulleted paragraph
.bx x no no Print x in a box (nofill only).
.ef 'x'y'z' '''' no Set even footer to x y z
.eh 'x'y'z' '''' no Set even header to x y z
.fo 'x'y'z' '''' no Set footer to x y z
.hx - no Suppress headers and footers on next page.
.he 'x'y'z' '''' no Set header to x y z
.hl - yes Draw a horizontal line
.i x no no Italicize x; if x missing, italic text follows.
.ip x y no yes Start indented paragraph, with hanging tag x. Indentation is y ens (default 5).
.lp yes yes Start left-blocked paragraph.
.np 1 yes Start numbered paragraph.
.of 'x'y'z' '''' no Set odd footer to x y z
.oh 'x'y'z' '''' no Set odd header to x y z
.pd - yes Print delayed text.
.pp no yes Begin paragraph. First line indented.
.r yes no Roman text follows.
.re - no Reset tabs to default values.
.sh n x - yes Section head follows, font automatically bold. n is level of section, x is title of section.
.sk no no Leave the next page blank. Only one page is remembered ahead.
.sm x - no Set x in a smaller pointsize.
.sz +n 10p no Augment the point size by n points.
.tp no yes Begin title page.
.u x - no Underline argument (even in troff). (Nofill only).
.uh - yes Like .sh but unnumbered.
.xp x - no Print index x.
3rd Berkeley Distribution 31 December 2010 GROFF_ME(7)