Sequential files in shell script

Asked

Viewed 32 times

0

Good morning, I have the following problem: I have many files of format some_X_YZ.txt, being that YZ represents a sequence of days.

I want to know how I can check if in a particular folder, with those files that vary YZ, if they are all present, as for example:

somethings_01.txt somethings_02.txt . . . somethings_30.txt

I need some command that checks this sequence of all the files in this sequence are in the folder.

  • I thought I’d put it in a for, but it would take a lot of work

  • it would take a lot of work to do at hand, the best thing to do is to use a repetition structure to do all the work, a while or a for

  • Managed to achieve his goal?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.