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 -->
  #4 (permalink)  
Old 05-15-2008
trey85stang trey85stang is offline
Registered User
 

Join Date: May 2008
Posts: 31
awesome penchal!

ls -ltr | grep "^d" | cut -c55-75

will work! Ill see if I can get what I want with dir without having to crep and cut as well

edit: On second though.. is there a way to just print everything from the 55 characters spot to the last character on the line? I think my variables with cut -c55-75 would include spaces tailed at the end? Im thinking tr could be used to do that.. but it would just make the command that much longer?
Reply With Quote