Sponsored Content
Full Discussion: Xargs
Top Forums UNIX for Dummies Questions & Answers Xargs Post 302856213 by vbe on Monday 23rd of September 2013 11:26:04 AM
Old 09-23-2013
The largest will not be with -nr but simply -n option of sort...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with xargs

Hi there, I am trying to move around 3000 files from one directory to another. The mv command is complaining from too many arguments. I tried to use the xargs command but with no luck. Could some body provide help? Regards (4 Replies)
Discussion started by: JimJim
4 Replies

2. Shell Programming and Scripting

why we use xargs..

hi , can anyone help me by saying why we use xargs.. is it acing like a place holder..? thanks, Krips. (3 Replies)
Discussion started by: kripssmart
3 Replies

3. UNIX for Advanced & Expert Users

xargs -P

I discovered that GNU's xargs has a -P option to allow its processes to run in parallel. Great! Is this a GNU thing, or is it supported by other platforms as well? (4 Replies)
Discussion started by: otheus
4 Replies

4. Shell Programming and Scripting

Using xargs

hi i just want to know that how do we use xargs command to find files which are greater than specified memory in a given directory (6 Replies)
Discussion started by: sumit the cool
6 Replies

5. Shell Programming and Scripting

Help in using xargs

Hi, I have a requirement to RCP the files from remote server to local server. Also the RCP has to run in parallel. However using 'xargs' retrives 2 file names during each loop. How do we restrict to only one file name using xargs and loop till remaining files. I use the below code for... (2 Replies)
Discussion started by: senthil3d
2 Replies

6. Shell Programming and Scripting

Xargs and

Hello there, Let me show you a simple example of what I am trying to achieve: 1) I have an input text file with some lines: 1 a 2 b 3 c 2) And I want to run a command with these lines as arguments (+ arbitrary extra arguments). For example: $ command "1 a" "2 b" "3 c" "bye" I... (7 Replies)
Discussion started by: tokland
7 Replies

7. Shell Programming and Scripting

Help with xargs

hi Could any one please tell me the option using which we can run multiple commands using xargs I have list of files, I want to run dos2unix and chmod at one shot on them I tried google n searched man pages but couldnt really find the solution , please help right now im doing this ls... (4 Replies)
Discussion started by: sunilmenhdiratt
4 Replies

8. Shell Programming and Scripting

xargs

Dear all , any suggest on xargs to combine from (1.txt and 2.txt) to output.txt ? thanks a lot. 1.txt 0123 BUM-5M BUM-5M 93490481 63839 0124 BUM-5M BUM-5M 112112 ... (3 Replies)
Discussion started by: samoptimus
3 Replies

9. Shell Programming and Scripting

Help with xargs

Using the bash shell I'm trying to either create a command for the command line or a script that will show netstat info for a given process name. Here is an example of what I'm trying to do:$ ps aux |grep catalina |grep -v grep | awk '{print $2}' 5132 $ netstat -nlp |grep 5132 (Not all processes... (11 Replies)
Discussion started by: axiopisty
11 Replies

10. Shell Programming and Scripting

Xargs

Hello, I need some help with xargs $ ls aaa bbb ccc ddd$ ls | xargs -I{} ls -la {} -rw-rw-r--. 1 xxx xx 0 May 30 20:04 aaa -rw-rw-r--. 1 xxx xx 0 May 30 20:04 bbb -rw-rw-r--. 1 xxx xx 0 May 30 20:04 ccc -rw-rw-r--. 1 xxx xx 0 May 30 20:04 dddit's possible to have output like this with... (3 Replies)
Discussion started by: vikus
3 Replies
pnmcolormap(1)						      General Commands Manual						    pnmcolormap(1)

NAME
pnmcolormap - create quantization color map for a portable anymap SYNOPSIS
pnmcolormap [-center|-meancolor|-meanpixel] [-spreadbrightness|-spreadluminosity] [-sort] [-square] ncolors|all [pnmfile] All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one to designate an option. You may use either white space or an equals sign between an option name and its value. DESCRIPTION
Reads a PNM image as input. Chooses ncolors colors to best represent the image, maps the existing colors to the new ones, and writes a PNM color map defining them as output. You can use this map as input to pnmremap on the same input image to quantize the colors in that image, I.e. produce a similar image with fewer colors. pnmquant does both the pnmcolormap and pnmremap steps for you. A PNM colormap is a PNM image of any dimensions that contains at least one pixel of each color in the set of colors it represents. The quantization method is Heckbert's "median cut". See the section QUANTIZATION METHOD. If the input image is a PPM, the output image is a PPM. If the input image is a PBM or PGM, the output colormap is a PGM. Note that a colormap of a PBM image is not very interesting. The colormap generally has the same maxval as the input image, but pnmcolormap may reduce it if there are too many colors in the input, as part of its quantization algorithm. If you want to create a colormap without basing it on the colors in an input image, see ppmcolors. PARAMETERS
The single parameter, which is required, is the number of colors you want in the output colormap. pnmcolormap may produce a color map with slightly fewer colors than that. You may specify all to get a colormap of every color in the input image (no quantization). OPTIONS -sort This option causes the output colormap to be sorted by the red component intensity, then the green, then the blue in ascending order. This is an insertion sort, so it is not very fast on large colormaps. Sorting is useful because it allows you to compare two sets of colors. -square By default, pnmcolormap produces as the color map a PPM image with one row and one column for each color in the colormap. This option causes pnmcolormap instead to produce a PPM image that is within one row or column of being square, with multiple pixels of the same color as necessary to create a number of pixels which is a perfect square. -verbose This option causes pnmcolormap to display messages to Standard Error about the quantization. -center -meancolor -meanpixel -spreadbrightness -spreadluminosity These options control the quantization algorithm. See QUANTIZATION METHOD below. QUANTIZATION METHOD
A quantization method is a way to choose which colors, being fewer in number than in the input, you want in the output. pnmcolormap uses Heckbert's "median cut" quantization method. This method involves separating all the colors into "boxes," each holding colors that represent about the same number of pixels. You start with one box and split boxes in two until the number of boxes is the same as the number of colors you want in the output, and choose one color to represent each box. When you split a box, you do it so that all the colors in one sub-box are "greater" than all the colors in the other. "Greater," for a particular box, means it is brighter in the color component (red, green, blue) which has the largest spread in that box. pnmcolormap gives you two ways to define "largest spread.": 1) largest spread of brightness; 2) largest spread of contribution to the luminosity of the color. E.g. red is weighted much more than blue. Select among these with the -spreadbrightness and -spreadluminosity options. The default is -spreadbrightness. pnmcut provides three ways of choosing a color to represent a box: 1) the center color - the color halfway between the greatest and least colors in the box, using the above definition of "greater"; 2) the mean of the colors (each component averaged separately by brightness) in the box; 3) the mean weighted by the number of pixels of a color in the image. Note that in all three methods, there may be colors in the output which do not appear in the input at all. Select among these with the -center, -meancolor, and -meanpixel options. The default is -center. REFERENCES
"Color Image Quantization for Frame Buffer Display" by Paul Heckbert, SIGGRAPH '82 Proceedings, page 297. SEE ALSO
pnmremap(1), pnmquant(1), ppmquantall(1), pnmdepth(1), ppmdither(1), ppmquant(1), ppm(5) AUTHOR
Copyright (C) 1989, 1991 by Jef Poskanzer. Copyright (C) 2001 by Bryan Henderson. 12 December 2001 pnmcolormap(1)
All times are GMT -4. The time now is 02:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy