|
Guides All Guides and HOWTO's. |
|
Thread Tools | Display Modes |
|
|||
Sorting on the file, given a list of files-with-path (beta)
Have a file you want to sort on the last field?
IOW a file or a pipe: say, files.txt /a/b/c/file2.htm a/b/file3.htm /a/first-file.htm Untested, but found a use-this-time working solution cat files.txt | gtr -s \/ " " | perl -lne 'print join " ", reverse split / /' | sort That or later varation with a slight modification enabled here a tee-to-a-file that I can read later as a solution to this week's problem (a few files accidentally deleted from a backup after a disk crash... so I can ascertain whether they can/should be replaced/lost etc. ... most were found elsewhere in the filesystem, a few not... ) Note that this solution was from a thread, and is only mostly understood here.
__________________
FreeBSD 13-STABLE |
Tags |
gtr perl sort |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fresh install require file flags schg assigned to dir or files? | dbach | OpenBSD Security | 4 | 1st May 2012 05:50 PM |
list open files - fstat? | jsmith6134 | OpenBSD General | 3 | 2nd September 2011 03:11 AM |
Mailing list application Majordomo 2 reveals file content | J65nko | News | 1 | 3rd February 2011 07:52 PM |
ls sorting of numbered files | gosha | General software and network | 6 | 11th April 2009 01:07 PM |
Sorting Packages | JMJ_coder | NetBSD Package System (pkgsrc) | 3 | 20th May 2008 01:08 AM |