In bash, I would like to extract some of the many file names and save this output in another file.
Files are formatted as coffee_ {SOME NUMBERS I WANT} .freqdist.
#!/bin/sh for f in $(find . -name 'coffee*.freqdist)
This code will find the entire coffee_ file {NOMEBERS i WANT} .freqdist. Now, how do I make an array containing only {SOME NUMBERS, I WANT} and write this to a file?
I know that for writing to a file, one would end the line as follows.
> log.txt
I skip the middle part, but how to filter the list of file names.
source share