The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Extracting from a tar file nmalencia UNIX Desktop for Dummies Questions & Answers 1 03-22-2008 06:42 AM
Extracting from second word ithirak17 Shell Programming and Scripting 3 02-14-2008 06:10 AM
extracting from tar.bz2 Raom UNIX for Advanced & Expert Users 1 03-07-2006 10:33 AM
Extracting strings hugow UNIX for Dummies Questions & Answers 1 06-24-2005 07:09 AM
extracting value from input saswerks Shell Programming and Scripting 3 02-24-2005 06:11 PM

Closed Thread
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
  #1 (permalink)  
Old 02-22-2006
amitkhiare amitkhiare is offline
Registered User
  
 

Join Date: Feb 2006
Location: Hong Kong
Posts: 24
Question Extracting only Alphabets from a value

Hi,

I have file name (abcd001). I want to extract on the alphabets from this file name. I don't want the numeric part of it. Once i extract the alphabets the i can search for all those file. Could anyone help on this. Thanks in advance
  #2 (permalink)  
Old 02-22-2006
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,791
This is what you asked for:

Code:
search=`echo $filename | tr -d [0-9]`
find /path -name "$file"\*

But I'm not sure that's what you need...
  #3 (permalink)  
Old 02-22-2006
amitkhiare amitkhiare is offline
Registered User
  
 

Join Date: Feb 2006
Location: Hong Kong
Posts: 24
Quote:
Originally Posted by jim mcnamara
This is what you asked for:

Code:
search=`echo $filename | tr -d [0-9]`
find /path -name "$file"\*

But I'm not sure that's what you need...
Hey Jim,

Thanks man that really worked. Here is it how it worked.

echo abcd001 | tr -d [0-9]

Output : abcd

Thats what i wanted. I just wanted to extract abcd from the file name.

Thanks you very much
Closed Thread

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 04:04 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