I believe it is possible. But I'm not sure I understand the task (sorry, English is not my native language). Please give examples of your input and the desired output. Maybe it would be enough if you give the desired output for my INPUTFILE:
All lines: 9
Lines between a: 1, 2, 0 (or maybe you need to remember line numbers - 1, 3, 6, 7?) so what output?
b: 2 - ?
c: ? (only one occurrence) - ?
d: 0 - ?
Thanks for your reply.
Yeah what I want is something like what you said. So, for your example input file, the output would be:
the first field being the contents of the line being repeated, the second field the number of times found in the file, the third field being the average of "every how many lines it is repeated". So for example for 'a', first it appears after 2 lines, then 3 lines then 1 line. So the average of this makes 2 lines. Then for 'b' and 'd' since they are only duplicated once, there won't be a need to make an average. And, since 'c' is never repeated, then the average is just '0' (or could be blank, it doesn't matter).
On the other hand, how about keeping track of the timestamp and subtracting it to make the "time between repetitions" and then making an average? That was my original idea but I don't know how to keep track of this time, per each repeated line. The output in this case would be something like:
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi,
I have one question regarding the understanding of “load average” in a platform with virtual processors.
Suppose in this situation:
Total number of physical processors: 1
Number of virtual processors: 32
Total number of cores: 4
Number of cores per physical... (1 Reply)
Hi all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 Replies)
Hi,
I am on a Solaris8 machine
If someone can help me with adjusting this awk 1 liner (turning it into a real awkscript) to get by this "event not found error"
...or
Present Perl solution code that works for Perl5.8 in the csh shell ...that would be great.
******************
... (3 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT DEBIAN
fntsample
fntsample(1) General Commands Manual fntsample(1)NAME
fntsample - PDF and PostScript font samples generator
SYNOPSIS
fntsample [ OPTIONS ] -f FONT-FILE -o OUTPUT-FILE
fntsample -h
DESCRIPTION
fntsample program can be used to generate font samples that show Unicode coverage of the font and are similar in appearance to Unicode
charts. Samples can be saved into PDF (default) or PostScript file.
OPTIONS
fntsample supports the following options.
--font-file, -f FONT-FILE
Make samples of FONT-FILE.
--font-index, -n IDX
Font index for FONT-FILE specified using --font-file option. Useful for files that contain multiple fonts, like TrueType Collec-
tions (.ttc). By default font with index 0 is used.
--output-file, -o OUTPUT-FILE
Write output to OUTPUT-FILE.
--other-font-file, -d OTHER-FONT
Compare FONT-FILE with OTHER-FONT. Glyphs added to FONT-FILE will be highlighted.
--other-index, -m IDX
Font index for OTHER-FONT specified using --other-font-file option.
--postscript-output, -s
Use PostScript format for output instead of PDF.
--svg, -g
Use SVG format for output. The generated document contains one page. Use range selection options to specify which.
--print-outline, -l
Print document outlines data to standard output. This data can be used to add outlines (aka bookmarks) to resulting PDF file with
pdfoutline program.
--include-range, -i RANGE
Show characters in RANGE.
--exclude-range, -x RANGE
Do not show characters in RANGE.
--style, -t "STYLE: VAL"
Set STYLE to value VAL. Run fntsample with option --help to see list of styles and default values.
--help, -h
Display help text and exit.
Parameter RANGE for -i and -x can be given as one integer or a pair of integers delimited by minus sign (-). Integers can be specified in
decimal, hexadecimal (0x...) or octal (0...) format. One integer of a pair can be missing (-N can be used to specify all characters with
codes less or equal to N, and N- for all characters with codes greather or equal to N). Multiple -i and -x options can be used.
EXAMPLES
Make PDF samples for font.ttf and write them to file samples.pdf:
fntsample -f font.ttf -o samples.pdf
Make PDF samples for font.ttf, compare it with oldfont.ttf and highlight new glyphs. Write output to file samples.pdf:
fntsample -f font.ttf -d oldfont.ttf -o samples.pdf
Make PostScript samples for font.ttf and write output to file samples.ps. Show only glyphs for characters with codes less or equal to
U+04FF but exclude U+0370-U+03FF:
fntsample -f font.ttf -s -o samples.ps -i -0x04FF -x 0x0370-0x03FF
Make PDF samples for font.ttf and save output to file samples.pdf adding outlines to it:
fntsample -f font.ttf -o temp.pdf -l > outlines.txt
pdfoutline temp.pdf outlines.txt samples.pdf
AUTHOR
Copyright (C) 2007 Eugeniy Meshcheryakov <eugen@debian.org>
Homepage: <http://fntsample.sourceforge.net/>
SEE ALSO pdfoutline(1)
2010-10-14 fntsample(1)