can u help me out to print last two words of each sentence of a file.
for example.
contents of input file:
i love songs
my favourite songs
sent
songs all kind
good buddy
Ouput file should contain:
love songs
favourite songs
sent
all kind
good buddy (5 Replies)
Hi,
Please suggest a way to print number of words in the end of each line.
<input file>
red aunt house
blue sky
bat and ball game
<output file>
red aunt house 3
blue sky 2
bat and ball game 4
Thanks! (2 Replies)
Hi,
I have a file whose lines are something like
Tchampionspsq^@~^@^^^A^@^@^@^A^A^Aÿð^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^?ð^@^@^@^@^@^@^@?ð^@^@^@^@^@^@pppsq^@~^@#@^@^@^@^@^@^Hw^H^@^@^@^K^@^@^@^@xp^At^@^FTtime2psq^@ ~^@^^^A^@^@^@^B^A
I need to extract all words matching T*psq from the file.
Thing is... (4 Replies)
Hello Friends,
I need to print lines in between two string when a keyword existed in those lines (keywords like exception, error, failed, not started etc).
for example,
input:
..
Begin Edr
ab12
ac13
ad14
bc23
exception occured
bd24
cd34
dd44
ee55
ff66
End Edr (2 Replies)
Hi experts,
I have a file with regexes which is used for automatic searches on several files (40+ GB).
To do some postprocessing with the grep result I need the matching line as well as the match itself.
I know that the latter could be achieved with grep's -o option. But I'm not aware of a... (2 Replies)
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
Input:
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
My input looks like this.
# Lot Of CODE Before
AppType_somethinglese=$(cat << EOF
AppType_test1='test-tool/blatest-tool-ear'
AppType_test2='test/blabla-ear'
# Lot Of CODE After
I want to print text betwen 1) _ and = and 2)/ and ' from each line
and exclude lines with "EOF".
Output... (2 Replies)
Hello,
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
6 Replies
LEARN ABOUT BSD
man
MAN(7) Miscellaneous Information Manual MAN(7)NAME
man - macros to typeset manual
SYNOPSIS
nroff -man file ...
troff -man file ...
DESCRIPTION
These macros are used to lay out pages of this manual. A skeleton page may be found in the file /usr/man/man.template.
Any text argument t may be zero to six words. Quotes may be used to include blanks in a `word'. If text is empty, special treatment is
applied to the next input line with text to be printed. In this way .I may be used to italicize a whole line, or .SM may be followed by .B
to make small bold letters.
A prevailing indent distance is remembered between successive indented paragraphs, and is reset to default value upon reaching a non-
indented paragraph. Default units for indents i are ens.
Type font and size are reset to default values before each paragraph, and after processing font and size setting macros.
These strings are predefined by -man:
*R `(Reg)', trademark symbol in troff.
*S Change to default type size.
FILES
/usr/share/tmac/tmac.an
/usr/man/man.template
SEE ALSO troff(1), man(1)BUGS
Relative indents don't nest.
REQUESTS
Request Cause If no Explanation Break Argument .B t no t=n.t.l.*Text t is bold. .BI
t no t=n.t.l. Join words of t alternating bold and italic. .BR t no t=n.t.l. Join words of t
alternating bold and Roman. .DT no .5i 1i...Restore default tabs. .HP i yes i=p.i.* Set pre-
vailing indent to i. Begin paragraph with hanging indent. .I t no t=n.t.l. Text t is italic. .IB
t no t=n.t.l. Join words of t alternating italic and bold. .IP x i yes x="" Same as .TP with tag
x. .IR t no t=n.t.l. Join words of t alternating italic and Roman. .LP yes - Same as
.PP. .PD d no d=.4v Interparagraph distance is d. .PP yes - Begin paragraph. Set
prevailing indent to .5i. .RE yes - End of relative indent. Set prevailing indent to amount of
starting .RS. .RB t no t=n.t.l. Join words of t alternating Roman and bold. .RI
t no t=n.t.l. Join words of t alternating Roman and italic. .RS i yes i=p.i. Start relative
indent, move left margin in distance i. Set prevailing indent to .5i for nested indents. .SH
t yes t=n.t.l. Subhead. .SM t no t=n.t.l. Text t is small. .TH n c x v m yes -Begin
page named n of chapter c; x is extra commentary, e.g. `local', for page foot center; v alters page foot left, e.g.
`4th Berkeley Distribution'; m alters page head center, e.g. `Brand X Programmer's Manual'. Set prevailing indent and
tabs to .5i. .TP i yes i=p.i. Set prevailing indent to i. Begin indented paragraph with hanging tag given
by next text line. If tag doesn't fit, place it on separate line.
* n.t.l. = next text line; p.i. = prevailing indent
7th Edition October 22, 1996 MAN(7)