Input File:
Desired Output
Code Try:
I plan to sum the column 2 if column 1 is within every 100 group.
eg.
Sum all the column 2 value if column 1 is range within 1 to 100;
Sum all the column 2 value if column 1 is range within 101 to 200;
Sum all the column 2 value if column 1 is range within 201 to 300;
Desired output should have 20 line which column 1 is every 100 and sum its corresponding column 2 data (maximum record in data set is 2000).
The command I try is quite tedious as I need to type the command one by one from 1 to 100 till 1901 to 2000 and sum its corresponding column 2 data.
Thanks for any advice.
Last edited by perl_beginner; 01-18-2017 at 10:18 AM..
Reason: Typo error
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Hi;
For sure there's an easy answer to this one that I am not finding..
I first set a variable, say
b1a:] max=5
then I want to use max to set the range for a for loop like so (it should run for i in 1:5)
b1a:] for i in {1..$max}; do echo $i; done
{1..5}
I would like the output... (2 Replies)
Hi,
Can someone help me to get the complete files size (sum) over a perod time (1 day,2days)in a directory.
eg:
Directory :ABC
I have a1,a2,a3 files are created in last 24 hours so I need to get the some of all these files.
I am using the below find command but its giving me the... (1 Reply)
Input file
2 1159,310,
4 142,199,218,91,
3 91,273,349,
Desired output result
2 1469
4 650
3 713
I have long list of input file as shown above.
It has a "," delimited to separate between each record in column 2.... (1 Reply)
Hi all,
I have a large matrix of 720 x 25. I want to get sum of range of rows and columns. Like, I need sum of all columns and row number 2 to 21, then leaving 22nd row, again sum of all columns and row number 23 to 42 again leaving 43rd row and then sum of 44th to 63. Means I want to add all... (4 Replies)
I have files being generated in format A20140326.00........ to A20140326.24.............
I need to copy these hourly basis from one location to another.
Eg. If i copy from 14 to 19 the hour, I use wildcard as A201403226.1*.
Requirement is : I need to copy from 06 hour and wil run the script... (1 Reply)
In my Linux system ephemeral port range is showing different ranges as follows
$ cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000
cat /etc/sysctl.conf | grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 9000 65500
Which will be the effective ephemeral port... (5 Replies)
ppmtosixel(1) General Commands Manual ppmtosixel(1)NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS -raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO ppm(5)AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)