I have a file with multiple entries and I have calculated the percentages. Now I want to know how many of my entries are there between 1-10% 11-20% and so on..
My percentages are in double,so it needs to be rounded off to the nearest and then accordingly calculate. How can I do this in awk?
To start I have a table that has ticketholders. Each ticket holder has a unique number and each ticket holder is associated to a so called household number. You can have multiple guests w/i a household.
I would like to create 3 flags (form a, for a household that has 1-4 gst) form b 5-8 gsts... (3 Replies)
Hi,
this might be a basic question...
why is that wc -c counts 1 more per line than what is there.
for example,
> cat dum1.txt
123
12
> wc -c dum1.txt
7 dum1.txt
Thanks,
Sameer. (4 Replies)
Hi,
I have a file with 2500 entries. There are many duplicates,triplicates symbols in my file in the first column and the second column has categories(high/medium/low) . I want to have count for the occurances of each category for each unique symbol
ABC high
ABC high
ABC medium
ABC ... (2 Replies)
This is very easy , but I`m struggling .. please help modify my script,
I want to count the number of h and n , from the second column group by the first. The second column is binary, can only have h and n.
a h
a h
a n
a n
a h
b h
b h
b h
b h
b h
c n
c h
c h
c h
c h (2 Replies)
In the attached file if I do a count for "aaaaaaaaaaaa" in either notepad++ or excel I get 118,456.
However, when I do either
grep -o aaaaaaaaaaaa 12A.txt | wc -w or
awk '{
for (i=1;i<=NF;i++)
if ( $i == "aaaaaaaaaaaa")
c++
}
END{
print c}' 12A.txt
I... (3 Replies)
Hi,
Recently i have write a simple script to capture CPU high usage based on prstat but i found out that it did capture correctly. I need to capture the rows that contains CPU usage more than 3%. Below line which i thought will capture CPU usage based CPU column in prstat(9th parameter) which is... (3 Replies)
Discussion started by: tharmendran
3 Replies
LEARN ABOUT MOJAVE
tiff2bw
tiff2bw(1) User Commands tiff2bw(1)NAME
tiff2bw - convert a color TIFF image to grayscale
SYNOPSIS
tiff2bw [options] input.tif output.tif
DESCRIPTION
tiff2bw converts an RGB or palette color TIFF image to a grayscale image by combining percentages of the red, green, and blue channels. By
default, output samples are created by taking 28% of the red channel, 59% of the green channel, and 11% of the blue channel. To alter these
percentages, use the -R. -G, and -B options.
OPTIONS
The following options are supported:
-B Specify the percentage of the blue channel to use. The default value is 11.
-c Specify a compression scheme to use when writing image data:
-c g3 CCITT Group 3 compression algorithm.
-c g4 CCITT Group 4 compression algorithm.
-c lzw Lempel-Ziv and Welch algorithm. This is the default algorithm.
-c none No compression.
-c packbits PackBits compression algorithm.
-c zip Deflate compression algorithm.
-G Specify the percentage of the green channel to use. The default value is 59.
-R Specify the percentage of the red channel to use. The default value is 28.
-r Write data with a specified number of rows per strip. By default, the number of rows per strip is selected so that each
strip is approximately 8 kilobytes.
OPERANDS
The following operands are supported:
input.tif The name of the input TIFF file.
output.tif The name of the output file.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWTiff |
+-----------------------------+-----------------------------+
|Interface stability |External |
+-----------------------------+-----------------------------+
SEE ALSO pal2rgb(1), tiffinfo(1), tiffcp(1), tiffmedian(1), libtiff(3)NOTES
Updated by Breda McColgan, Sun Microsystems Inc., 2004.
SunOS 5.10 26 Mar 2004 tiff2bw(1)