Discussion:
awk for `ls -t`
(too old to reply)
n***@outlook.com
2019-02-20 21:49:07 UTC
Permalink
This post is only partially related to oberon.
--------------
I can't understand these people who claim `ls -t` is not needed ?!
If you're working in a Dir which has 50 files, some of them 5 years
old, OBVIOUSLY you want the 3 to 7 of the current job to be at the
TOP of the the list; or reversed order would still be usable.

Android, whos `ls -l` I can't paste here, has an extra problem:
that the drwx & lrwx entries have got the size-field missing.
So simply `sorting` on `cut -f N-M` is not helpful.
But I suspect that `awk` could do it?

Please advise.
c***@gmail.com
2019-02-21 10:38:19 UTC
Permalink
Post by n***@outlook.com
This post is only partially related to oberon.
--------------
I can't understand these people who claim `ls -t` is not needed ?!
If you're working in a Dir which has 50 files, some of them 5 years
old, OBVIOUSLY you want the 3 to 7 of the current job to be at the
TOP of the the list; or reversed order would still be usable.
That sort of comment reminds me of many English tourists in the early days of continental travel who used to complain about not being able to get fish and chips or a decent cup of tea ... ;-)

When I'm working in Windows I absolutely need to be able to sort by date as well as size, name etc. in ascending / descending order.

However, my working practices in Oberon are totally different to how I work in Windows. It is so much easier in Oberon to create and gradually update a tool window that remains visible all the time and contains all the filenames, commands and everything else that I need for the task I am currently working on. Consequently I don't find myself endlessly searching for files and folders.

Microsoft is obviously aware of these problems as they are gradually introducing these sort or techniques with features like 'recently used files and folders', 'Quick access' lists of folders etc. etc.

Regards,
Chris Burrows
CFB Software
http://www.astrobe.com
r***@gmail.com
2019-02-22 23:04:53 UTC
Permalink
Hi,
Post by n***@outlook.com
I can't understand these people who claim `ls -t` is not needed ?!
...
that the drwx & lrwx entries have got the size-field missing.
So simply `sorting` on `cut -f N-M` is not helpful.
But I suspect that `awk` could do it?
Try asking on news://comp.lang.awk or reading the (online) GAWK manual
(which is quite good):

* https://www.gnu.org/software/gawk/manual/

Loading...