Sponsored Content
Top Forums Shell Programming and Scripting script for remove descending order number Post 302558163 by Franklin52 on Friday 23rd of September 2011 02:37:45 AM
Old 09-23-2011
Quote:
Originally Posted by nithyanandan
hi Mr.Franklin

But this above script is printing as it is not removing that descending order line , is there any other command to solve this problem this values r creating velocity so it shouldn't decrease value so i want to remove that line . i can remove manually but near 2000000 lines & more than thousand files r there Smilie
once again thanks Mr .Franklin
With the given input file I get the desired output:
Code:
$ cat file
1        100  200 135.00   Gk_wirs   1
               1        100 200  136.00   Gk_wirs   50
               1        110 210  138.00   Gk_wirs   60
               1        100 200  136.00   Gk_wirs   57
 #
               2        200  400 135.00   Gk_wirs   1
               2        200  400 135.00   Gk_wirs   45
               2        200  400 135.00   Gk_wirs   651
               2        200  400 135.00   Gk_wirs   120
                2        200  400 135.00   Gk_wirs   4550
#
$
$ awk '!n{n=$NF}($NF>=n){print;n=$NF}/#/{print;n=0}' file
1        100  200 135.00   Gk_wirs   1
               1        100 200  136.00   Gk_wirs   50
               1        110 210  138.00   Gk_wirs   60
 #
               2        200  400 135.00   Gk_wirs   1
               2        200  400 135.00   Gk_wirs   45
               2        200  400 135.00   Gk_wirs   651
                2        200  400 135.00   Gk_wirs   4550
#

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to see disk usage in descending order

What is the command used by sysadmin to see the disk used by the users in descending order of their disk usage? (8 Replies)
Discussion started by: asutoshch
8 Replies

2. Shell Programming and Scripting

filter and get the latest order number

hello, how can I filter and get the latest order number (last five digits) below: input file: johnmm00001 maryyy00121 johnm100222 johnmm00003 maryyy00122 output file: johnmm00003 maryyy00122 johnm100222 (6 Replies)
Discussion started by: happyv
6 Replies

3. Shell Programming and Scripting

Ascending & Descending order numbers

Dear All, I have below attached file in which i have many nos, i want the last ascending order nos. The brief description is given below. File 315 381 432 315 381 432 315 381 432 315 381 432 315 381 432 (6 Replies)
Discussion started by: pravani1
6 Replies

4. UNIX for Dummies Questions & Answers

Help - Find command with list of files modified descending Order

Hi, I would like to know the command to get the files order in descending order with "FIND" command. Appreciate your help Thanks (4 Replies)
Discussion started by: TonySolarisAdmi
4 Replies

5. Shell Programming and Scripting

Regarding about the print line number/order

Hello, I am trying to print line number/order using this command awk '{print $0, FNR}' myfilename 11006 A41 1888 11006 A41 1888 11006 A41 1888 11006 A41 ... (2 Replies)
Discussion started by: davidkhan
2 Replies

6. UNIX for Dummies Questions & Answers

how to list descending order

Hi, I want to short descending all the files according to their size.Please help me.. (1 Reply)
Discussion started by: jyotidas
1 Replies

7. Shell Programming and Scripting

Help with sort data based on descending order problem

Input file 9.99331e-13 8.98451e-65 9.98418e-34 7.98319e-08 365592 111669 74942.9 0 Desired output 365592 111669 74942.9 7.98319e-08 1.99331e-13 6.98418e-34 (2 Replies)
Discussion started by: perl_beginner
2 Replies

8. UNIX for Dummies Questions & Answers

Sorting a file in descending order when you have 10e- values

Hi, I am trying to sort the following file in descending order of its fourth column. 2 1 363828 -2.423225e-03 3 1 363828 4.132763e-03 3 2 363828 8.150133e-03 4 1 363828 4.126890e-03 I use sort -k4,4g -r input.txt > output.txt ... (1 Reply)
Discussion started by: evelibertine
1 Replies

9. Shell Programming and Scripting

How to remove no max value and order?

How do I remove maxvalue and noorder? I've a list of files with the following similar content Prompt Sequence SEQ_AD_ID; CREATE SEQUENCE SEQ_AD_ID START WITH 1 MAXVALUE 1000000000000 MINVALUE 1 NOCYCLE CACHE 10 NOORDER; to Prompt Sequence SEQ_AD_ID; CREATE... (2 Replies)
Discussion started by: jediwannabe
2 Replies

10. Shell Programming and Scripting

How to sort list of directories in descending order in perl?

Hi, I have a problem . I have few directories like inpTDT_1, inpTDT_2, inpTDT_3 and so on inside HOME directory . In one of my perl script (which is in my HOME), the above directories like inpTDT_1, inpTDT_2, inpTDT_3 are sorting out in an order So I wanted to sort all the inpTDT_1, inpTDT_2,... (1 Reply)
Discussion started by: venkatesh
1 Replies
IMAGEARC(3)								 1							       IMAGEARC(3)

imagearc - Draws an arc

SYNOPSIS
bool imagearc (resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color) DESCRIPTION
imagearc(3) draws an arc of circle centered at the given coordinates. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $cx - x-coordinate of the center. o $cy - y-coordinate of the center. o $width - The arc width. o $height - The arc height. o $start - The arc start angle, in degrees. o $end - The arc end angle, in degrees. 0o is located at the three-o'clock position, and the arc is drawn clockwise. o $color - A color identifier created with imagecolorallocate(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Drawing a circle with imagearc(3) <?php // create a 200*200 image $img = imagecreatetruecolor(200, 200); // allocate some colors $white = imagecolorallocate($img, 255, 255, 255); $red = imagecolorallocate($img, 255, 0, 0); $green = imagecolorallocate($img, 0, 255, 0); $blue = imagecolorallocate($img, 0, 0, 255); // draw the head imagearc($img, 100, 100, 200, 200, 0, 360, $white); // mouth imagearc($img, 100, 100, 150, 150, 25, 155, $red); // left and then the right eye imagearc($img, 60, 75, 50, 50, 0, 360, $green); imagearc($img, 140, 75, 50, 50, 0, 360, $blue); // output image in the browser header("Content-type: image/png"); imagepng($img); // free memory imagedestroy($img); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Drawing a circle with imagearc() SEE ALSO
imagefilledarc(3), imageellipse(3), imagefilledellipse(3). PHP Documentation Group IMAGEARC(3)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy