I'm doing basic bash for loops to copy data from one directory to my current directory.
My files are named in this pattern:
stuff.002.morestuff.nc
It's 14 files total, and the names are the same except for the number, but there are hundreds of files in the directory I'm copying from. It goes from 002 to 015. I'm just trying to copy 002,003,004,...,014,015 but it's proving harder than expected; right now I'm just doing echo to make sure I'm getting the names right before I copy tons of gigs of data to my computer.
The best thing I've tried:
files=/path/to/dir/stuff.0*[02...15...03456789].morestuff.nc;
for f in $files; do echo $f; done
And that gives me way too many files with numbers ranging from 002 to 035, which is not what I need.
I appreciate any answers for my basic question, I was really surprised that there was nothing very similar to this. I'll worry about the copying later; the names are driving me crazy right now. Sorry if the format and lingo is off, this is my first question here and I'm still really new to this.