I have a script that takes about 10 mins to run. I want to print something to the terminal to give a visual indicator that something is happening. The original command is as follows:
stats:
$(MAKE) add > last_output.txt 2> err.txt
It waits for the Makefile target "add" to return and sends the output to last_output.txt and then doesn't print out the errors to the terminal.
I don't have much experience with Makefiles and shell scripting but, after googling I have come up with a line like this:
stats:
@until $(MAKE) $* > last_output.txt 2> err.txt; do echo -n "." ; done
It doesn't print anything out. But what I want to happen is while the original script is waiting to return the output look like:
$ make stats
.
..
...
....
.....
<results of target "stats">
I can't add a progress bar to the original script because I cannot edit it. Since I can't add a progress bar I figured something like this would still do a similar job. Any help is greatly appreciated.