Using awk is probably the easiest way. It handles floating point arithmetics well (whereas bash doesn't):
I use awk's -v switch to set the variable "z", and then outer shell loop to loop through it. Although you could as well (actually more efficiently) do the outer z loop within awk itself. The awk command is just the condition; which results in printing the line that fullfills the condition.
You can then easily redirect the output to a file, and sort the output files, if you like.
I have a feeling you can figure out the rest yourself, but if you need help, feel free to ask.
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 all,
First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for.
I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
I need to sort the following file by the rhdiskpower devices in the last column:
Total_MB Free_MB OS_MB Name Failgroup Library Label UDID Product Redund Path
1024 851 1024 OCRVOT1_0000 OCRVOT1_0000 System UNKNOWN ... (3 Replies)
I have a file1.txt
file1.txt
F-120009210","Felix","U-M-F-F-F-","white","yes","no","U-M-F-F-F-","Bristol","RI","true"
F-120009213","Fluffy","U-F-","white","yes","no","M-F-","Warwick","RI","true"
U-120009217","Lity","U-M-","grey","yes","yes","","Fall River","MA","true"... (4 Replies)
I have a group of files that I need to be sorted by number. I have tried to use the sort command without any luck.
ls includes*
includes1
includes10
includes11
includes12
includes2
includes3
includes4
includes5
includes6
includes7
includes8
includes9
I have tried ls includes*... (6 Replies)
Hi All,
I have 2 pipe delimited files viz., file_old and file_new. I'm trying to compare these 2 files, and extract all the different rows between them into a new_file.
comm -3 < sort file_old < sort file_new > new_file
I am getting the below error:
-ksh: sort: cannot open
But if I do... (7 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,
I'm trying to copy and paste the sixth column from a bunch of files into a single file having each column pasted in separate columns (and not one after each other in just one column.)
I tried this code but works only partially because it copied and pasted 50 rows of each column... (6 Replies)
I have a content.xls file as given below,
NC_020815.1 1891831 1894692 virb4_A0A0H2X8Z4_ 1 954 1945
NC_020815.1 1883937 1886123 vird4_A0A0P9KA26_ 1 729 1379
NC_020815.1 2976151 2974985 virb10_H8FLU5_Ba 1 393 478
NC_020815.1 2968797 2967745 virb6_A0A0Q5GCZ4 5 398 499... (2 Replies)
Discussion started by: dineshkumarsrk
2 Replies
LEARN ABOUT REDHAT
plotchangelog
PLOTCHANGELOG(1) General Commands Manual PLOTCHANGELOG(1)NAME
plotchangelog - graph debian changelogs
SYNOPSIS
plotchangelog [options] changelog ...
DESCRIPTION
plotchangelog is a tool to aid in visualizing a Debian changelog. The changelogs are graphed with gnuplot(1) , with the X axis of the graph
denoting time of release and the Y axis denoting the debian version number of the package. Each individual release of the package is repre-
sented by a point, and the points are color coded to indicate who released that version of the package. The upstream version number of the
package can also be labeled on the graph.
Alternatively, the Y axis can be configured to display the size of the changelog entry for each new version. Or it can be configured to
display approximately how many bugs were fixed for each new version.
Note that if the package is a debian-specific package, the entire package version will be used for the Y axis. This does not always work
perfectly.
READING THE GRAPH
The general outline of a package's graph is typically a series of peaks, starting at 1, going up to n, and then returning abruptly to 1.
The higher the peaks, the more releases the maintainer made between new upstream versions of the package. If a package is debian-only, it's
graph will just grow upwards without ever falling (although a bug in this program may cause it to fall sometimes, if the version number
goes from say, 0.9 to say, 0.10 - this is interpreted wrong..)
If the graph dips below 1, someone made a NMU of the package and upgraded it to a new upstream version, thus setting the debian version to
0. NMU's in general appear as fractional points like 1.1, 2.1, etc. A NMU can also be easily detected by looking at the points that repre-
sent which maintainer uploaded the package -- a solitary point of a different type than the points before and after it is typically a NMU.
It's also easy to tell by looking at the points when a package changes maintainers.
OPTIONS -l, --linecount
Instead of using the debian version number as the Y axis, use the number of lines in the changelog entry for each version. Cannot
be used together with --bugcount.
-b, --bugcount
Instead of using the debian version number as the Y axis, use the number of bugs that were closed by each changelog entry. Note that
this number is obtained by searching for "#dddd" in the changelog, and so it may be inaccurate. Cannot be used together with
--linecount.
-c, --cumulative
When used together with either --bugcount or --linecount, graphs the cumulative count rather than the count in each individual
changelog entry.
-v, --no-version
Do not show upstream version labels. Useful if the graph gets too crowded.
-m, --no-maint
Do not differentiate between different maintainers of the package.
-s file, --save=file
Save the graph to file in postscript format instead of immediately displaying it.
-u, --urgency
Use larger points when displaying higher-urgency package uploads.
--verbose
Output the gnuplot script that is fed into gnuplot (for debugging purposes).
-gcommands, --gnuplot=commands
This allows you to insert gnuplot(1) commands into the gnuplot script that is used to generate the graph. The commands are placed
after all initialization but before the final plot command. This can be used to override the default look provided by this program
in arbitrary ways. You can also use things like "set terminal png color" to change the output file type, which is useful in conjunc-
tion with the -s option.
--help Show a usage summary.
--version
Display version, author and copyright information.
--noconf, --no-conf
Do not read any configuration files (see below).
changelog ...
The changelog files to graph. If multiple files are specified they will all be display on the same graph. The files may be com-
pressed with gzip. Any text in them that is not in Debian changelog format will be ignored.
CONFIGURATION VARIABLES
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order to set configuration variables.
The --no-conf option can be used to prevent reading these files. Environment variable settings are ignored when these configuration files
are read. The currently recognised variables are:
PLOTCHANGELOG_OPTIONS
This is a space-separated list of options to always use, for example -l -b. Do not include -g or --gnuplot among this list as it
may be ignored; see the next variable instead.
PLOTCHANGELOG_GNUPLOT
These are gnuplot commands which will be prepended to any such commands given on the command line.
SEE ALSO devscripts.conf(5).
AUTHOR
Joey Hess <joey@kitenet.net>
DEBIAN Debian Utilities PLOTCHANGELOG(1)