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 -->
  #1 (permalink)  
Old 10-21-2008
phreezr phreezr is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 11
Question Another sed question

Hello, I am very new to shell scripting and have a directory path such as:
/usr/dev/blah/Arch/release/812-1235-P05/files/list and I want to output:

812-1235-P05

I think using sed with a regex like [0-9]-[0-9]-[0-9]?[a-z] would be the way to go, but I am having much trouble getting it to work. Any suggestions? Thank you.