Sponsored Content
Top Forums Shell Programming and Scripting Detect continuous number as range Post 302974017 by before4 on Wednesday 25th of May 2016 02:35:59 AM
Old 05-25-2016
Work perfect, and good finding for my mistake many thanks
 

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
strictures(3pm) 					User Contributed Perl Documentation					   strictures(3pm)

NAME
strictures - turn on strict and make all warnings fatal SYNOPSIS
use strictures 1; is equivalent to use strict; use warnings FATAL => 'all'; except when called from a file where $0 matches: /^x?t/.*.t$/ and when either '.git' or '.svn' is present in the current directory (with the intention of only forcing extra tests on the author side) - or when the PERL_STRICTURES_EXTRA environment variable is set, in which case use strictures 1; is equivalent to use strict; use warnings FATAL => 'all'; no indirect 'fatal'; no multidimensional; no bareword::filehandles; Note that _EXTRA may at some point add even more tests, with only a minor version increase, but any changes to the effect of 'use strictures' in normal mode will involve a major version bump. If any of the extra testing modules are not present, strictures will complain loudly, once, via warn(), and then shut up. But you really should consider installing them, they're all great anti-footgun tools. DESCRIPTION
I've been writing the equivalent of this module at the top of my code for about a year now. I figured it was time to make it shorter. Things like the importer in 'use Moose' don't help me because they turn warnings on but don't make them fatal - which from my point of view is useless because I want an exception to tell me my code isn't warnings clean. Any time I see a warning from my code, that indicates a mistake. Any time my code encounters a mistake, I want a crash - not spew to STDERR and then unknown (and probably undesired) subsequent behaviour. I also want to ensure that obvious coding mistakes, like indirect object syntax (and not so obvious mistakes that cause things to accidentally compile as such) get caught, but not at the cost of an XS dependency and not at the cost of blowing things up on another machine. Therefore, strictures turns on additional checking, but only when it thinks it's running in a test file in a VCS checkout - though if this causes undesired behaviour this can be overridden by setting the PERL_STRICTURES_EXTRA environment variable. If additional useful author side checks come to mind, I'll add them to the _EXTRA code path only - this will result in a minor version increase (i.e. 1.000000 to 1.001000 (1.1.0) or similar). Any fixes only to the mechanism of this code will result in a subversion increas (i.e. 1.000000 to 1.000001 (1.0.1)). If the behaviour of 'use strictures' in normal mode changes in any way, that will constitute a major version increase - and the code already checks when its version is tested to ensure that use strictures 1; will continue to only introduce the current set of strictures even if 2.0 is installed. METHODS
import This method does the setup work described above in "DESCRIPTION" VERSION This method traps the strictures->VERSION(1) call produced by a use line with a version number on it and does the version check. COMMUNITY AND SUPPORT
IRC channel irc.perl.org #toolchain (or bug 'mst' in query on there or freenode) Git repository Gitweb is on http://git.shadowcat.co.uk/ and the clone URL is: git clone git://git.shadowcat.co.uk/p5sagit/strictures.git AUTHOR
mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk> CONTRIBUTORS
None required yet. Maybe this module is perfect (hahahahaha ...). COPYRIGHT
Copyright (c) 2010 the strictures "AUTHOR" and "CONTRIBUTORS" as listed above. LICENSE
This library is free software and may be distributed under the same terms as perl itself. perl v5.14.2 2012-04-08 strictures(3pm)
All times are GMT -4. The time now is 08:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy