Ask Your Question
0

How do I obtain a date sequence to create a file glob?

asked 2022-11-21 11:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-09-07 02:00:00 +0000

nofretete gravatar image

You can obtain a date sequence to create a file glob by using the following command in a terminal or command prompt:

echo /path/to/files/file_{20210101..20210131}.txt

This will generate a sequence of file names with dates ranging from January 1st, 2021 to January 31st, 2021, in the format of “file_yyyymmdd.txt”.

You can modify the start and end dates to generate different sets of file names as required.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-21 11:00:00 +0000

Seen: 9 times

Last updated: Sep 07 '21