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 -->
  #3 (permalink)  
Old 11-21-2007
Franklin52 Franklin52 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,348
With sed:


Code:
ps -f | sed 's!.*\/\(.*\)\..*!\1!'

with the extension ".def":


Code:
ps -f | sed 's!.*\/\(.*\)\..*!\1.def!'

Regards

Last edited by Franklin52; 11-21-2007 at 12:40 PM..