The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 11-22-2007
fayya fayya is offline
Registered User
 

Join Date: Nov 2007
Posts: 4
Hi I have a similar problem, I would like to get a number that falls within a range from a string.

ex. input: "abcd 9034 efg 1234 hi"
output: 9034

I would only want to get the number range from 9000-9999

I've tried to use sed/grep to get what I want for hours but not able to do it, can anyone advice on this? Thanks a lot!!!
Reply With Quote