The UNIX and Linux Forums  

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
Count number of occurences of a word shikhakaul UNIX for Dummies Questions & Answers 8 06-25-2009 12:10 PM
PERL: Simple reg expr validate 6 digits number BufferExploder Shell Programming and Scripting 2 09-10-2008 12:15 PM
Count the number of occurence of perticular word from file rinku Shell Programming and Scripting 40 08-10-2007 08:33 PM
word count showing wrong number of lines tselvanin UNIX for Dummies Questions & Answers 3 01-06-2004 11:33 PM
restrain the number of digits of a PID mlefebvr UNIX for Advanced & Expert Users 1 05-27-2002 10:33 AM

 
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 Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-05-2009
./hari.sh's Avatar
./hari.sh ./hari.sh is offline
Registered User
  
 

Join Date: Jul 2007
Location: India
Posts: 44
Count number of digits in a word

Hi all

Can anybody suggest me, how to get the count of digits in a word

I tried

Code:
WORD=abcd1234
echo $WORD | grep -oE [[:digit:]] | wc -l
4
It works in bash command line, but not in scripts
 

Bookmarks

Tags
perl, perl shift, shift, shift perl

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 08:12 PM.


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