The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help in if expresion justbow Shell Programming and Scripting 1 01-27-2009 05:50 AM
Regular Expression ravi_rn Shell Programming and Scripting 3 01-05-2009 10:16 AM
regular expression help Bob565656 Shell Programming and Scripting 6 09-09-2008 02:32 PM
Variable regular expresion in awk. Klashxx Shell Programming and Scripting 4 08-31-2006 02:17 AM
regular expresion question gillbates UNIX for Dummies Questions & Answers 3 09-13-2004 02:22 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-25-2009
eXPlosion eXPlosion is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 3
Regular expresion

Here's my script

read number
if echo $number | grep "[0-9][^a-zA-Z]"

I want this "if" statement to return true only when numbers without letters is matched.
For example 45 - true, 923 - true, r5 - false, tg/f - false and so on.
In this script even a single digit number like "3" returns false.

Thanks.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0