Sponsored Content
Full Discussion: interval based count
Top Forums Shell Programming and Scripting interval based count Post 302578981 by Diya123 on Saturday 3rd of December 2011 01:00:09 PM
Old 12-03-2011
interval based count

Hi,

I have a file with 4 million rows. what i am trying to achieve is for every 1000 interval count the number of rows and display it

i/p

Code:
12
200
400
750
1000
1500
1800
2200
2345
2600
2896
3020
3400
3689
3977

o/p

Code:
1-1000  5
1001-2000   2
2001-3000   4
3001-4000   4

Thanks,
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count of files based on date?

Hi Friends, Can anyone help me with this: To get the count of files that are existing in a directory created on a perticular date like in the example (01/08) .(having same pattern for the filename) ex: FileName Creted Date FILE001 01/08/2007 FILE005 ... (6 Replies)
Discussion started by: sbasetty
6 Replies

2. UNIX for Dummies Questions & Answers

sar and iostat recommended interval/count values.

Hi, I got a request from a client to check on their server's cpu, memory and disk utilization. Am planning to use the sar and iostat commands to achieve this. The server is used for sending and receiving messages between the stockbrokers, so I was thinking to run the commands during the market... (9 Replies)
Discussion started by: 60doses
9 Replies

3. Shell Programming and Scripting

Dynamic Variable Based on Count

I'm trying to assign variables that include the current value of a count, but I can't seem to get it working... this script is incomplete, but some guidance on how to use a dynamic variable would be helpful: Sample Input: bash-2.03$ more sg2.txt Results for group6 443 1394 Results for... (3 Replies)
Discussion started by: earnstaf
3 Replies

4. Shell Programming and Scripting

Need to search and replace based on character count

Hi, I wanted to add a newline character after every 100 characters in a file using a awk or shell without reading each line of the file. I want to run a command on the complete file. This does based on a string but i want to add a new line after every 100 characters ir-respective of the... (3 Replies)
Discussion started by: vijaykrc
3 Replies

5. Shell Programming and Scripting

compare the interval of 2 numbers of input2with interval of several numbers of input1

Help plz Does any one have any idea how to compare interval ranges of 2 files. finding 1-4 (1,2,3,4) of input2 in input1 of same key "a" values (5-10, 30-40, 45-60, 80-90, 100-120 ). Obviously 1-4 is not one of the range with in input1 a. so it should give out of range. finding 30-33(31,32,33)... (1 Reply)
Discussion started by: repinementer
1 Replies

6. UNIX for Dummies Questions & Answers

count values based on contents of another file

Hello, I have two files as shown below: test1 678 679 689 690 710 test2 1 678 654 800 676 791 689 900 I want to get a count of lines from test2 whose columns bound the values in test1 I tried running the code below; however am getting wrong results. (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

7. Shell Programming and Scripting

Value Increment based on count

Hi All, I have source file x.txt 0001|0003 0031|0031 0045|0049 My desired output should be: y.txt 0001 0002 0003 0031 0045 0046 0047 (11 Replies)
Discussion started by: kmsekhar
11 Replies

8. Shell Programming and Scripting

Count occurences based on interval

Hi, I have a file which has 4500 entries 10000 9880 9800 8700 8200 ... ..... ... ... ... ... ... ... ... 50 (1 Reply)
Discussion started by: Diya123
1 Replies

9. Shell Programming and Scripting

Need to count based on date

i have a file with data as follows: 3/23/2014 22:01:18 1 3/23/2014 22:01:47 0 3/23/2014 22:03:35 0 3/23/2014 22:04:50 1 3/24/2014 1:16:41 0 3/24/2014 1:18:00 0 3/24/2014 1:18:36 0 3/24/2014 1:21:46 0 3/25/2014 13:00:31 1 3/25/2014 13:00:54 0 3/25/2014 13:13:09 0 3/25/2014 13:14:15 0... (2 Replies)
Discussion started by: ssk250
2 Replies
METASYS(8)							    NUT Manual								METASYS(8)

NAME
metasys - Driver for Meta System UPS equipment NOTE
This man page only documents the hardware-specific features of the metasys driver. For information about the core driver, see nutupsdrv(8). SUPPORTED HARDWARE
The metasys driver was written with the "Meta System UPS Protocol Rev.1.12" kindly supplied from Meta System. The driver should support all the common features of the ups models: o HF Line (/2) 1-8 boards o HF Millennium (810, 820) o HF TOP Line (910, 920, 930, 940, 950, 970, 980) o ECO Network (750, 1000, 1050, 1500, 1800, 2000, 2100, 2500, 3000) o ECO (305, 308, 311, 511, 516, 519, 522, SX, SXI) o ally HF (800, 1000, 1250, 1600, 2000, 2500) o Megaline (1250, 2500, 3750, 5000, 6250, 7500, 8750, 10000) CABLING
The needed cable is a standard pin-to-pin serial cable with at least pins 2, 3, and 5 (on DB9 connector) connected. EXTRA ARGUMENTS
This driver supports no extra arguments from ups.conf(5). BUGS
This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only. Any information about the use of the driver with the other listed UPS are really welcome. AUTHOR
Fabio Di Niro <blaxwan@users.sourceforge.net> SEE ALSO
The core driver: nutupsdrv(8) Internet resources: The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ Network UPS Tools 05/21/2012 METASYS(8)
All times are GMT -4. The time now is 07:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy