I'm trying to figure out how to write a script that will run a command on files in a directory sequentially with a pause for each command to wait to complete. Here's an example.
cat >> text.txt && cat >> text2.txt
Above command works for both files as long as I manually type each file. My personal project has 559 files, i.e., text1.txt...text559.txt.
My last resort is to pull up a list of the file names in the terminal and go to my text editor and just build the script for a one time run. I would like to automate it if possible so any suggestions on how to get started would be appreciated.