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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-21-2009
trey85stang trey85stang is offline
Registered User
  
 

Join Date: May 2008
Posts: 70
Quote:
Originally Posted by Franklin52 View Post
Try this:

Code:
echo $clock | sed 's!.*"\(.*\)/.*!\1!'
Regards
thanks, but I was really just wondering if I could do this all with bash.

Quote:
Originally Posted by colemar View Post
Code:
colemar@deb:~$ echo ${clock:10:2}
US
I know that, but the problem lies that US is not alway US thus it can be more then 2 characters long...