I'm pretty new to bash shell programming, but I want to learn. I have a C++ file called run.cpp when run it gives lots of text files results such as output1.txt, output2.txt, etc until output2000.txt. First I want to create a file named Output; then compile and run the program. After I get all the txt file results, I want to move them inside Output file with the * wildcard.
I can do this from the shell seperately. However, I was not able to write a script for this that does it automatically.
Any help, or any point to a good reference on shell scripting would help a lot at this point.
Thank you in advance.
My shell commands are:
mkdir Output
g++ run.cpp -o run
cp *.txt /Output