To elaborate on this answer - Qshell/Pase are "Unix-like" environments. Grasping the unix philosophy helps to understand what I'm doing. https://en.wikipedia.org/wiki/Unix_philosophy The key concepts are small simple programs that do one thing well and the ability to pipe text strings to each other. Stat gives you a good formatting options, sort gives you good sorting options. ls is a good general purpose file lister, with several options for display and sorting, but doesn't have an option exactly like you want. Awk is good at handling delimited rows of data.

If you are having trouble sleeping or bored, The Unix CD Bookshelf will take you deep into stuff you will never use. It also has got explanations and references to the most common commands. https://www.e-reading.mobi/htmbook.php/orelly/unix3/index.htm You just need to remember by default the tools in Qshell and Pase may not be the versions described in the books. You will need to configure your environment to use the new open source tools available.


On Thu, 2021-09-23 at 13:52 +0000, Kevin Bucknum wrote:
stat -c "%y %n" * | sort -r
ls --full-time -t | awk '{print $6, $7, $9}'

On Thu, 2021-09-23 at 13:44 +0000, Howie, Bill wrote:
Hello all,

I'm working on a program where I need to show a list of files in an IFS directory and the dates of those files. I've been using the QSHELL "ls" command with the "-lt" option. In my program I dump the STDOUT file contents and read through them, parsing out the date and file name. Unfortunately in my experience with using the "-lt" option the date and file name fields don't start in exactly the same place all the time. So I've been playing around with other options of the "ls" command. I know of one that shows just the file name but I can't find one that shows just the file name and the file date. Any thoughts? I could resort to continuing to use the "-lt" option and scanning the string for spaces and using that approach to try to consistently get the fields, but I thought I'd ask the group if there was something I was missing before I take that approach.

As always, any info is most appreciated. Thanks!

[Related image]<https://www.hc-companies.com/>Bill Howie
Senior ERP Programmer/Analyst
Direct: 330.487.3739 | Cell: 330.888.8085 | Toll Free: 800.225.7712
2450 Edison Blvd, Suite 3, Twinsburg OH 44087
hc-companies.com<https://www.hc-companies.com/>
Leader in Horticultural Containers
[cid:image003.png@01D7B05D.1EDD36A0<mailto:image003.png@01D7B05D.1EDD36A0><mailto:image003.png@01D7B05D.1EDD36A0<mailto:image003.png@01D7B05D.1EDD36A0>>]<https://www.linkedin.com/company/the-hc-companies> [cid:image004.png@01D7B05D.1EDD36A0<mailto:image004.png@01D7B05D.1EDD36A0><mailto:image004.png@01D7B05D.1EDD36A0<mailto:image004.png@01D7B05D.1EDD36A0>>] <https://www.facebook.com/HCCompanies/> [cid:image005.png@01D7B05D.1EDD36A0<mailto:image005.png@01D7B05D.1EDD36A0><mailto:image005.png@01D7B05D.1EDD36A0<mailto:image005.png@01D7B05D.1EDD36A0>>] <https://www.instagram.com/hccompanies/> [cid:image006.png@01D7B05D.1EDD36A0<mailto:image006.png@01D7B05D.1EDD36A0><mailto:image006.png@01D7B05D.1EDD36A0<mailto:image006.png@01D7B05D.1EDD36A0>>] <https://twitter.com/hc_companies>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.

[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp]
Kevin Bucknum

Senior Programmer Analyst

MEDDATA / MEDTRON

120 Innwood Drive
Covington LA 70433
Local: 985-893-2550<tel:985-893-2550>
Toll Free: 877-893-2550<tel:877-893-2550>
https://www.medtronsoftware.com


CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp]
Kevin Bucknum

Senior Programmer Analyst

MEDDATA / MEDTRON

120 Innwood Drive
Covington LA 70433
Local: 985-893-2550<tel:985-893-2550>
Toll Free: 877-893-2550<tel:877-893-2550>
https://www.medtronsoftware.com


CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.