Sponsored Content
Top Forums Shell Programming and Scripting Detect continuous number as range Post 302974014 by before4 on Wednesday 25th of May 2016 01:58:54 AM
Old 05-25-2016
Detect continuous number as range

I have 100k data like this bellow , i want to group data to range
Code:
171
172
173
174
175
176
179
182
183
187
188
189
1900
1901
1903
1904
1905
1906
1907

expected output
Code:
171 176
179
182 183
187 189
1900 1901
1903 1907

is possible to use awk?

Last edited by before4; 05-25-2016 at 04:20 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

validate number range

Hi If I want to read user input and want to validate if it is a numeric number in some range of 1-100 what would be the best way? Sabina (5 Replies)
Discussion started by: sabina
5 Replies

2. Shell Programming and Scripting

extract number range from a file

Hi Everyone, a.txt 1272904667;1272904737;1 1272904747;1272904819;1 1272904810;1272904857;1 1272904889;1272904926;1 1272905399;1272905406;1 1272905411;1272905422;1 if i want to get the record, when the a.txt 1st field is between 1272904749 and 1272905399, any simple way by using awk,... (1 Reply)
Discussion started by: jimmy_y
1 Replies

3. Shell Programming and Scripting

Number range for SSNs

Hi All. I have a file that has an ID Number field....some of the ID Numbers are actual SSNs. ...does anyone know the range that SSNs may be...this is what I have found so far poking around SSN info sites.... greater than 001-01-0000 and less than 770-00-0000. Does anyone know this to be... (1 Reply)
Discussion started by: lyoncc
1 Replies

4. Shell Programming and Scripting

Closest Number from a Range of Numbers

out of a range of numbers, how can i pick out the number that is the closest to any arbitrary/random number that a user supplies? say the range of numbers are between 1 - 90000. but that doesn't mean each number exist between 1 - 90000. the range of numbers could be for example: 1, 3, 4, 6,... (6 Replies)
Discussion started by: SkySmart
6 Replies

5. Shell Programming and Scripting

how can I detect number series range

Hi I have one source file and content of source file as follows; 3 00 3 01 3 02 3 07 3 09 3 10 3 15 3 16 3 17 3 18 3 40 3 45 3 500 3 501 3 502 3 70 3 80 (8 Replies)
Discussion started by: kocaturk
8 Replies

6. Shell Programming and Scripting

Range of number from 0.1 to 10.0

Is there a way to create a loop that will output number starting from 0.1 to 10.0 0.1 0.2 0.3 0.4 0.5 .. ... 10.0 This is what i tried. for i in {1..50}; do printf -v i '%02d' $i ; echo "$i"; done That will print 01 02 03 .. .. 50 (9 Replies)
Discussion started by: vietrice
9 Replies

7. Shell Programming and Scripting

If statement test against number range [0-9]

Is it possible to test against a varible within a ranges in a if statement. ex. if ];then echo "not in range" else echo "number within range" fi (8 Replies)
Discussion started by: leemalloy
8 Replies

8. Shell Programming and Scripting

Fill data if number range is given

Hi I want to get all numbers if number range is given as input. Eg: INPUT FILE 100-105 107 108-112 OUTPUT REQUIRED: 100 101 102 103 104 105 107 108 109 110 111 112 How can I do it using shell? :confused: Thanks in advance. (11 Replies)
Discussion started by: dashing201
11 Replies

9. Shell Programming and Scripting

Generating Random Number in certain range

Hi there I am trying to generate a random number between 40 and 70 using the shell here is my code so far and it keeps going above 70. all help much appreciated! comp=$(( RANDOM%70+40 )) echo $comp (4 Replies)
Discussion started by: faintingquiche
4 Replies

10. UNIX for Dummies Questions & Answers

Using sed to replace a range of number

Trying to use SED to replace numbers that fall into a range but can't seem to get the logic to work and am wondering if SED will do this. I have a file with the following numbers 3 26 20 5. For the numbers that are greater than zero and less than 25, SED would add the word range after the... (7 Replies)
Discussion started by: jimmyf
7 Replies
ISO_8859-8(7)						     Linux Programmer's Manual						     ISO_8859-8(7)

NAME
iso_8859-8 - the ISO 8859-8 character set encoded in octal, decimal, and hexadecimal DESCRIPTION
The ISO 8859 standard includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). ISO 8859-8, or "ISO Hebrew" encodes the characters used in Modern Hebrew (or Ivrit). Neither short vowels nor diacritical marks are included, and Yiddish is not provided for. ISO 8859 Alphabets The full set of ISO 8859 alphabets includes: ISO 8859-1 West European languages (Latin-1) ISO 8859-2 Central and East European languages (Latin-2) ISO 8859-3 Southeast European and miscellaneous languages (Latin-3) ISO 8859-4 Scandinavian/Baltic languages (Latin-4) ISO 8859-5 Latin/Cyrillic ISO 8859-6 Latin/Arabic ISO 8859-7 Latin/Greek ISO 8859-8 Latin/Hebrew ISO 8859-9 Latin-1 modification for Turkish (Latin-5) ISO 8859-10 Lappish/Nordic/Eskimo languages (Latin-6) ISO 8859-11 Latin/Thai ISO 8859-13 Baltic Rim languages (Latin-7) ISO 8859-14 Celtic (Latin-8) ISO 8859-15 West European languages (Latin-9) ISO 8859-16 Romanian (Latin-10) ISO 8859-8 Characters The following table displays the characters in ISO 8859-8, which are printable and unlisted in the ascii(7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-8. Oct Dec Hex Char Description -------------------------------------------------------------------- 240 160 A0 NO-BREAK SPACE 242 162 A2 c CENT SIGN 243 163 A3 L POUND SIGN 244 164 A4 x CURRENCY SIGN 245 165 A5 Y YEN SIGN 246 166 A6 | BROKEN BAR 247 167 A7 S SECTION SIGN 250 168 A8 " DIAERESIS 251 169 A9 (C) COPYRIGHT SIGN 252 170 AA x MULTIPLICATION SIGN 253 171 AB << LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 254 172 AC ~ NOT SIGN 255 173 AD SOFT HYPHEN 256 174 AE (_) REGISTERED SIGN 257 175 AF MACRON 260 176 B0 o DEGREE SIGN 261 177 B1 +- PLUS-MINUS SIGN 262 178 B2 2 SUPERSCRIPT TWO 263 179 B3 3 SUPERSCRIPT THREE 264 180 B4 ' ACUTE ACCENT 265 181 B5 u MICRO SIGN 266 182 B6 9| PILCROW SIGN 267 183 B7 . MIDDLE DOT 270 184 B8 , CEDILLA 271 185 B9 1 SUPERSCRIPT ONE 272 186 BA -:- DIVISION SIGN 273 187 BB >> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 274 188 BC 1/4 VULGAR FRACTION ONE QUARTER 275 189 BD 1/2 VULGAR FRACTION ONE HALF 276 190 BE 3/4 VULGAR FRACTION THREE QUARTERS 337 223 DF DOUBLE LOW LINE 340 224 E0 HEBREW LETTER ALEF 341 225 E1 HEBREW LETTER BET 342 226 E2 HEBREW LETTER GIMEL 343 227 E3 HEBREW LETTER DALET 344 228 E4 HEBREW LETTER HE 345 229 E5 HEBREW LETTER VAV 346 230 E6 HEBREW LETTER ZAYIN 347 231 E7 HEBREW LETTER HET 350 232 E8 HEBREW LETTER TET 351 233 E9 HEBREW LETTER YOD 352 234 EA HEBREW LETTER FINAL KAF 353 235 EB HEBREW LETTER KAF 354 236 EC HEBREW LETTER LAMED 355 237 ED HEBREW LETTER FINAL MEM 356 238 EE HEBREW LETTER MEM 357 239 EF HEBREW LETTER FINAL NUN 360 240 F0 HEBREW LETTER NUN 361 241 F1 HEBREW LETTER SAMEKH 362 242 F2 HEBREW LETTER AYIN 363 243 F3 HEBREW LETTER FINAL PE 364 244 F4 HEBREW LETTER PE 365 245 F5 HEBREW LETTER FINAL TSADI 366 246 F6 HEBREW LETTER TSADI 367 247 F7 HEBREW LETTER QOF 370 248 F8 HEBREW LETTER RESH 371 249 F9 HEBREW LETTER SHIN 372 250 FA HEBREW LETTER TAV 375 253 FD LEFT-TO-RIGHT MARK 376 254 FE RIGHT-TO-LEFT MARK NOTES
ISO 8859-8 was also known as ISO-IR-138. SEE ALSO
ascii(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2010-09-20 ISO_8859-8(7)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy