truncate until delimiter

Vadkan Jozsef jozsi.avadkan at gmail.com
Sun Feb 28 14:13:09 UTC 2010


e.g.:

$ ls -tr `find -type f` | grep ".txt$" | rev
txt.nimdaymphp/.
txt.ccuc/aborp/.
txt.og/.
txt.osle/.
txt.kidosam/.


I Want to truncate this output, until the first "/":

$ ls -tr `find -type f` | grep ".txt$" | rev | THE-MAGIC-COMES-HERE
.
aborp/.
.
.
.

How?

I just want to modify the names of some files, but I can't do it if they
have their full path "in their names"..

Thank you!





More information about the ubuntu-users mailing list