Skip to main content
deleted 5 characters in body
Source Link
Nicolas Raoul
  • 8.5k
  • 14
  • 49
  • 56

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files get removed each day, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files get removed each day, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files get removed each day, so the probability of reaching z is zero. So, after z any strategy is acceptable: aa, using integers, or even using UUIDs.

Tweeted twitter.com/#!/StackUnix/status/613007518214844416
deleted 7 characters in body
Source Link
Nicolas Raoul
  • 8.5k
  • 14
  • 49
  • 56

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files are also ventilated by dateget removed each day, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files are also ventilated by date, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files get removed each day, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

added 180 characters in body
Source Link
Nicolas Raoul
  • 8.5k
  • 14
  • 49
  • 56

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files are also ventilated by date, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

My system creates a new text file every time a certain event occurs.
The files should be named file_a.txt file_b.txt file_c.txt etc.

In a Bash shell script,how to find out what filename should be used next?

For instance, if file_a.txt and file_b.txt exist but not file_c.txt, then the next available filename is file_c.txt.

This could be a number if it is easier.
I started designing an algorithm but there is probably an easier way?

Note: Files are also ventilated by date, so the probability of reaching z is zero. So, after z than any strategy is acceptable: aa, using integers, or even using UUIDs.

Source Link
Nicolas Raoul
  • 8.5k
  • 14
  • 49
  • 56
Loading