Unix / Linex script for rename file name with date digit

1 view
Skip to first unread message

SK

unread,
Jun 2, 2020, 5:20:24 AM6/2/20
to Bash One-liners

a script (in bash, or any scripting language of your choice other than zsh) to print the name of the most recently accessed file in the directory /var/run/ with a name in the form scores<DD>.txt (here <DD> represents exactly 2 digits; thus the filename consists of scores followed by exactly 2 digits, followed by .txt

Note: "most recently accessed" is not the same as "most recently modified".

The output of the script should be just one filename, and nothing else. Choice of appropriate language is important. (And remember, zsh is not available on the system.)

Reply all
Reply to author
Forward
0 new messages